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;