From: "Måns Rullgård" <mru@mru.ath.cx>
To: video4linux-list@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Fix mmap access of transport stream from saa7134
Date: Wed, 20 Oct 2004 17:07:53 +0200 [thread overview]
Message-ID: <yw1xacuh4ed2.fsf@mru.ath.cx> (raw)
This patch fixes mmap access of transport stream from saa7134/saa6752hs.
It causes the encoder to be initialized when the device is opened,
instead of on the first call to read().
The patch is against 2.6.9.
Signed-off-by: Måns Rullgård <mru@mru.ath.cx>
===== drivers/media/video/saa7134/saa7134-ts.c 1.13 vs edited =====
--- 1.13/drivers/media/video/saa7134/saa7134-ts.c 2004-07-12 10:01:15 +02:00
+++ edited/drivers/media/video/saa7134/saa7134-ts.c 2004-10-20 17:02:08 +02:00
@@ -211,10 +211,10 @@
if (dev->ts.users)
goto done;
- dev->ts.started = 0;
dev->ts.users++;
file->private_data = dev;
err = 0;
+ ts_init_encoder(dev, NULL);
done:
up(&dev->ts.ts.lock);
@@ -233,8 +233,7 @@
dev->ts.users--;
/* stop the encoder */
- if (dev->ts.started)
- ts_reset_encoder(dev);
+ ts_reset_encoder(dev);
up(&dev->ts.ts.lock);
return 0;
@@ -245,11 +244,6 @@
{
struct saa7134_dev *dev = file->private_data;
- if (!dev->ts.started) {
- ts_init_encoder(dev, NULL);
- dev->ts.started = 1;
- }
-
return videobuf_read_stream(file, &dev->ts.ts, data, count, ppos, 0);
}
--
Måns Rullgård
mru@mru.ath.cx
reply other threads:[~2004-10-20 15:18 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=yw1xacuh4ed2.fsf@mru.ath.cx \
--to=mru@mru.ath.cx \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®