Skip to content

Commit

Permalink
[media] em28xx: fix VBI handling logic
Browse files Browse the repository at this point in the history
When both VBI and video are streaming, and video stream is stopped,
a subsequent trial to restart it will fail, because S_FMT will
return -EBUSY.

That prevents applications like zvbi to work properly.

Please notice that, while this fix it fully for zvbi, the
best is to get rid of streaming_users and res_get logic as a hole.

However, this single-line patch is better to be merged at -stable.

Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  • Loading branch information
Mauro Carvalho Chehab committed Sep 22, 2014
1 parent 9123553 commit c7854c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/usb/em28xx/em28xx-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
struct em28xx *dev = video_drvdata(file);
struct em28xx_v4l2 *v4l2 = dev->v4l2;

if (v4l2->streaming_users > 0)
if (vb2_is_busy(&v4l2->vb_vidq))
return -EBUSY;

vidioc_try_fmt_vid_cap(file, priv, f);
Expand Down

0 comments on commit c7854c2

Please sign in to comment.