aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-02-03 03:12:18 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-03-27 10:36:29 -0400
commitd0b66fdfd3c5c31764740f6ffe5a345549d6af97 (patch)
treee67e8e19e552632024a6df0e9fa0d9b4823522fc
parent50953e0640b3473dcb409d5d0d938c2742c93b0d (diff)
[media] ivtv: only start streaming in poll() if polling for input
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/ivtv/ivtv-fileops.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c
index c9663e885b9..9ff69b5a87e 100644
--- a/drivers/media/video/ivtv/ivtv-fileops.c
+++ b/drivers/media/video/ivtv/ivtv-fileops.c
@@ -746,8 +746,9 @@ unsigned int ivtv_v4l2_dec_poll(struct file *filp, poll_table *wait)
746 return res; 746 return res;
747} 747}
748 748
749unsigned int ivtv_v4l2_enc_poll(struct file *filp, poll_table * wait) 749unsigned int ivtv_v4l2_enc_poll(struct file *filp, poll_table *wait)
750{ 750{
751 unsigned long req_events = poll_requested_events(wait);
751 struct ivtv_open_id *id = fh2id(filp->private_data); 752 struct ivtv_open_id *id = fh2id(filp->private_data);
752 struct ivtv *itv = id->itv; 753 struct ivtv *itv = id->itv;
753 struct ivtv_stream *s = &itv->streams[id->type]; 754 struct ivtv_stream *s = &itv->streams[id->type];
@@ -755,7 +756,8 @@ unsigned int ivtv_v4l2_enc_poll(struct file *filp, poll_table * wait)
755 unsigned res = 0; 756 unsigned res = 0;
756 757
757 /* Start a capture if there is none */ 758 /* Start a capture if there is none */
758 if (!eof && !test_bit(IVTV_F_S_STREAMING, &s->s_flags)) { 759 if (!eof && !test_bit(IVTV_F_S_STREAMING, &s->s_flags) &&
760 (req_events & (POLLIN | POLLRDNORM))) {
759 int rc; 761 int rc;
760 762
761 rc = ivtv_start_capture(id); 763 rc = ivtv_start_capture(id);