From 4c9f462423338a812378924233eac55ce0e96fb8 Mon Sep 17 00:00:00 2001 From: YixingShen Date: Fri, 26 Jan 2024 09:09:18 +0800 Subject: [PATCH] add "set tx_busy 1" into video_capture's video_tas for "if (tx_busy) return" --- examples/device/video_capture/src/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/device/video_capture/src/main.c b/examples/device/video_capture/src/main.c index 711d4710a..759c06057 100644 --- a/examples/device/video_capture/src/main.c +++ b/examples/device/video_capture/src/main.c @@ -185,6 +185,7 @@ void video_task(void) if (!already_sent) { already_sent = 1; + tx_busy = 1; start_ms = board_millis(); #ifdef CFG_EXAMPLE_VIDEO_READONLY # if defined(CFG_EXAMPLE_VIDEO_DISABLE_MJPEG) @@ -203,6 +204,7 @@ void video_task(void) if (cur - start_ms < interval_ms) return; // not enough time if (tx_busy) return; start_ms += interval_ms; + tx_busy = 1; #ifdef CFG_EXAMPLE_VIDEO_READONLY # if defined(CFG_EXAMPLE_VIDEO_DISABLE_MJPEG)