提交 d0b66fdf 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

[media] ivtv: only start streaming in poll() if polling for input

Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Acked-by: NAndy Walls <awalls@md.metrocast.net>
Signed-off-by: NHans de Goede <hdegoede@redhat.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 50953e06
......@@ -746,8 +746,9 @@ unsigned int ivtv_v4l2_dec_poll(struct file *filp, poll_table *wait)
return res;
}
unsigned int ivtv_v4l2_enc_poll(struct file *filp, poll_table * wait)
unsigned int ivtv_v4l2_enc_poll(struct file *filp, poll_table *wait)
{
unsigned long req_events = poll_requested_events(wait);
struct ivtv_open_id *id = fh2id(filp->private_data);
struct ivtv *itv = id->itv;
struct ivtv_stream *s = &itv->streams[id->type];
......@@ -755,7 +756,8 @@ unsigned int ivtv_v4l2_enc_poll(struct file *filp, poll_table * wait)
unsigned res = 0;
/* Start a capture if there is none */
if (!eof && !test_bit(IVTV_F_S_STREAMING, &s->s_flags)) {
if (!eof && !test_bit(IVTV_F_S_STREAMING, &s->s_flags) &&
(req_events & (POLLIN | POLLRDNORM))) {
int rc;
rc = ivtv_start_capture(id);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册