* [PATCH] Fix mmap access of transport stream from saa7134
@ 2004-10-20 15:07 Måns Rullgård
0 siblings, 0 replies; only message in thread
From: Måns Rullgård @ 2004-10-20 15:07 UTC (permalink / raw)
To: video4linux-list; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-20 15:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-20 15:07 [PATCH] Fix mmap access of transport stream from saa7134 Måns Rullgård
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®