Skip to content

Commit 8d0622e

Browse files
mchehabgregkh
authored andcommitted
media: em28xx: fix VBI handling logic
commit c7854c2 upstream. 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. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent fcdc612 commit 8d0622e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/media/usb/em28xx/em28xx-video.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
13441344
struct em28xx *dev = video_drvdata(file);
13451345
struct em28xx_v4l2 *v4l2 = dev->v4l2;
13461346

1347-
if (v4l2->streaming_users > 0)
1347+
if (vb2_is_busy(&v4l2->vb_vidq))
13481348
return -EBUSY;
13491349

13501350
vidioc_try_fmt_vid_cap(file, priv, f);

0 commit comments

Comments
 (0)