summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/uvc/uvc_video.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@skynet.be>2008-09-15 22:24:29 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 09:37:08 -0200
commitd63beb9ef004ff9587b3c466361276254d57d7a7 (patch)
tree76b06c29dc32ffd60d0b54e719da31b5d6d78b1e /drivers/media/video/uvc/uvc_video.c
parent80845e1078463913f8b456e45f1fae886687c363 (diff)
V4L/DVB (9031): uvcvideo: Fix incomplete frame drop when switching to a variable size format.
When streaming in a fixed size format the driver sets a flag in the uvc_queue structure to drop incomplete incoming frames. The flag wasn't cleared when switching to a variable size format, which resulted in a broken 'MJPEG after YUV'. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/uvc/uvc_video.c')
-rw-r--r--drivers/media/video/uvc/uvc_video.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c
index 593aebffe57..b7bb23820d8 100644
--- a/drivers/media/video/uvc/uvc_video.c
+++ b/drivers/media/video/uvc/uvc_video.c
@@ -971,6 +971,11 @@ int uvc_video_enable(struct uvc_video_device *video, int enable)
return 0;
}
+ if (video->streaming->cur_format->flags & UVC_FMT_FLAG_COMPRESSED)
+ video->queue.flags &= ~UVC_QUEUE_DROP_INCOMPLETE;
+ else
+ video->queue.flags |= UVC_QUEUE_DROP_INCOMPLETE;
+
if ((ret = uvc_queue_enable(&video->queue, 1)) < 0)
return ret;