public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Dean A." <dean@sensoray.com>
To: mchehab@infradead.org, v4l-dvb-maintainer@linuxtv.org,
	video4linux-list@redhat.com
Cc: dean@sensoray.com
Subject: [PATCH] s2255drv field count fix
Date: Tue, 9 Sep 2008 08:29:56 -0700 (PDT)	[thread overview]
Message-ID: <tkrat.c89a311b7d53c0ac@sensoray.com> (raw)

From: Dean Anderson <dean@sensoray.com>

Fixes videobuf field_count

Signed-off-by: Dean Anderson <dean@sensoray.com>
---
Note: Please review the vivi driver. Using buf->vb.field_count++ in vivi
may be incorrect if there are multiple buffers.


--- /usr/src/v4l-dvb-ff052010c4cb/linux/drivers/media/video/s2255drv.c.orig	2008-09-09 08:08:01.000000000 -0700
+++ /usr/src/v4l-dvb-ff052010c4cb/linux/drivers/media/video/s2255drv.c	2008-09-09 08:08:50.000000000 -0700
@@ -687,7 +687,7 @@ static void s2255_fillbuff(struct s2255_
 		(unsigned long)vbuf, pos);
 	/* tell v4l buffer was filled */
 
-	buf->vb.field_count++;
+	buf->vb.field_count = dev->frame_count[chn] * 2;
 	do_gettimeofday(&ts);
 	buf->vb.ts = ts;
 	buf->vb.state = VIDEOBUF_DONE;
@@ -1304,6 +1304,7 @@ static int vidioc_streamon(struct file *
 	dev->last_frame[chn] = -1;
 	dev->bad_payload[chn] = 0;
 	dev->cur_frame[chn] = 0;
+	dev->frame_count[chn] = 0;
 	for (j = 0; j < SYS_FRAMES; j++) {
 		dev->buffer[chn].frame[j].ulState = S2255_READ_IDLE;
 		dev->buffer[chn].frame[j].cur_size = 0;

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

                 reply	other threads:[~2008-09-09 17:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tkrat.c89a311b7d53c0ac@sensoray.com \
    --to=dean@sensoray.com \
    --cc=mchehab@infradead.org \
    --cc=v4l-dvb-maintainer@linuxtv.org \
    --cc=video4linux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox