Skip to content

Commit 4c9f462

Browse files
committed
add "set tx_busy 1" into video_capture's video_tas for "if (tx_busy) return"
1 parent 1913044 commit 4c9f462

File tree

1 file changed

+2
-0
lines changed
  • examples/device/video_capture/src

1 file changed

+2
-0
lines changed

examples/device/video_capture/src/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ void video_task(void)
185185

186186
if (!already_sent) {
187187
already_sent = 1;
188+
tx_busy = 1;
188189
start_ms = board_millis();
189190
#ifdef CFG_EXAMPLE_VIDEO_READONLY
190191
# if defined(CFG_EXAMPLE_VIDEO_DISABLE_MJPEG)
@@ -203,6 +204,7 @@ void video_task(void)
203204
if (cur - start_ms < interval_ms) return; // not enough time
204205
if (tx_busy) return;
205206
start_ms += interval_ms;
207+
tx_busy = 1;
206208

207209
#ifdef CFG_EXAMPLE_VIDEO_READONLY
208210
# if defined(CFG_EXAMPLE_VIDEO_DISABLE_MJPEG)

0 commit comments

Comments
 (0)