Skip to contentSkip to conversation

saa7134-video.c: fix the block bug

PATCH Superseded figo.zhang 1 participant 1 message May 8, 2009 Media (V4L/DVB)

lore
Share & tools
lore

figo.zhang

author
#0 lore raw

PATCH 1/1 saa7134-video.c: fix the block bug

when re-open or re-start (video_streamon), the q->curr would not be NULL in saa7134_buffer_queue(), and all the qbuf will add to q->queue list,no one to do activate to start DMA,and then no interrupt would happened,so it will be block.

In VIDEOBUF_NEEDS_INIT state , inital the curr pointer to be NULL int the buffer_prepare().

---
 drivers/media/video/saa7134/saa7134-video.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/media/video/saa7134/saa7134-video.c +1 -0
index 493cad9..550d6ce 100644
@@ -1057,6 +1057,7 @@ static int buffer_prepare(struct videobuf_queue *q,
 		buf->vb.field  = field;
 		buf->fmt       = fh->fmt;
 		buf->pt        = &fh->pt_cap;
+		dev->video_q.curr = NULL;
 
 		err = videobuf_iolock(q,&buf->vb,&dev->ovbuf);
 		if (err)