提交 d63beb9e 编写于 作者: L Laurent Pinchart 提交者: Mauro Carvalho Chehab

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: NLaurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 80845e10
......@@ -842,10 +842,6 @@ static int uvc_v4l2_do_ioctl(struct inode *inode, struct file *file,
if (ret < 0)
return ret;
if (!(video->streaming->cur_format->flags &
UVC_FMT_FLAG_COMPRESSED))
video->queue.flags |= UVC_QUEUE_DROP_INCOMPLETE;
rb->count = ret;
ret = 0;
break;
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册