diff options
| author | sakumisu <[email protected]> | 2025-07-16 22:54:21 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2025-07-16 22:54:21 +0800 |
| commit | 1e8e440721f8475960f45cf43b5c89cd44c8d95d (patch) | |
| tree | 9edddc208f20407bec58db15c8402024c53c0f15 | |
| parent | 605a967282e506ea3acccfe20a0edaf2ce8caebc (diff) | |
fix(demo): ignore zero bytes for bl ip
Signed-off-by: sakumisu <[email protected]>
| -rw-r--r-- | demo/video_audiov1_hid_template.c | 4 | ||||
| -rw-r--r-- | demo/video_static_h264_template.c | 4 | ||||
| -rw-r--r-- | demo/video_static_mjpeg_template.c | 4 | ||||
| -rw-r--r-- | demo/video_static_yuyv_template.c | 4 |
4 files changed, 16 insertions, 0 deletions
diff --git a/demo/video_audiov1_hid_template.c b/demo/video_audiov1_hid_template.c index 1d1948c9..99df89b9 100644 --- a/demo/video_audiov1_hid_template.c +++ b/demo/video_audiov1_hid_template.c @@ -448,6 +448,10 @@ void usbd_video_close(uint8_t busid, uint8_t intf) void usbd_video_iso_callback(uint8_t busid, uint8_t ep, uint32_t nbytes) { + if (nbytes == 0) { + return; + } + if (usbd_video_stream_split_transfer(busid, ep)) { /* one frame has done */ video_iso_tx_busy = false; diff --git a/demo/video_static_h264_template.c b/demo/video_static_h264_template.c index a472244b..7337f5f7 100644 --- a/demo/video_static_h264_template.c +++ b/demo/video_static_h264_template.c @@ -252,6 +252,10 @@ void usbd_video_close(uint8_t busid, uint8_t intf) void usbd_video_iso_callback(uint8_t busid, uint8_t ep, uint32_t nbytes) { + if (nbytes == 0) { + return; + } + if (usbd_video_stream_split_transfer(busid, ep)) { /* one frame has done */ iso_tx_busy = false; diff --git a/demo/video_static_mjpeg_template.c b/demo/video_static_mjpeg_template.c index 667a2fbb..3fc923f8 100644 --- a/demo/video_static_mjpeg_template.c +++ b/demo/video_static_mjpeg_template.c @@ -252,6 +252,10 @@ void usbd_video_close(uint8_t busid, uint8_t intf) void usbd_video_iso_callback(uint8_t busid, uint8_t ep, uint32_t nbytes) { + if (nbytes == 0) { + return; + } + if (usbd_video_stream_split_transfer(busid, ep)) { /* one frame has done */ iso_tx_busy = false; diff --git a/demo/video_static_yuyv_template.c b/demo/video_static_yuyv_template.c index 6b5da39d..7c7d1789 100644 --- a/demo/video_static_yuyv_template.c +++ b/demo/video_static_yuyv_template.c @@ -256,6 +256,10 @@ void usbd_video_close(uint8_t busid, uint8_t intf) void usbd_video_iso_callback(uint8_t busid, uint8_t ep, uint32_t nbytes) { + if (nbytes == 0) { + return; + } + if (usbd_video_stream_split_transfer(busid, ep)) { /* one frame has done */ iso_tx_busy = false; |
