summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hunold <devnull@localhost>2003-01-05 18:42:20 +0000
committerMichael Hunold <devnull@localhost>2003-01-05 18:42:20 +0000
commitdff7346d93620339a65fcf2dd8f94ead9ef20e43 (patch)
treef10ecc11fec534ec54089d2a970878db16be8db6
parent74da6acaec2a3b10a9491ba7fc267aa9c5b5911c (diff)
downloadmediapointer-dvb-s2-dff7346d93620339a65fcf2dd8f94ead9ef20e43.tar.gz
mediapointer-dvb-s2-dff7346d93620339a65fcf2dd8f94ead9ef20e43.tar.bz2
Fixed a saa7146 driver flaw: after a read() call is satisfied,
a previoulsy running overlay window should be re-enabled.
-rw-r--r--linux/drivers/media/common/saa7146_video.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/linux/drivers/media/common/saa7146_video.c b/linux/drivers/media/common/saa7146_video.c
index 8a2d83c98..c5dfca244 100644
--- a/linux/drivers/media/common/saa7146_video.c
+++ b/linux/drivers/media/common/saa7146_video.c
@@ -1303,8 +1303,17 @@ ssize_t video_read(struct file *file, char *data, size_t count, loff_t *ppos)
struct saa7146_vv *vv = dev->vv_data;
ssize_t ret = 0;
+ int restart_overlay = 0;
+ struct saa7146_fh *ov_fh = NULL;
+
DEB_EE(("called.\n"));
+ if( vv->ov_data != NULL ) {
+ ov_fh = vv->ov_data->fh;
+ stop_preview(ov_fh);
+ restart_overlay = 1;
+ }
+
if( 0 != video_begin(fh)) {
return -EAGAIN;
}
@@ -1312,8 +1321,8 @@ ssize_t video_read(struct file *file, char *data, size_t count, loff_t *ppos)
video_end(fh);
/* restart overlay if it was active before */
- if( 0 != vv->ov_data) {
- start_preview(vv->ov_data->fh);
+ if( 0 != restart_overlay ) {
+ start_preview(ov_fh);
}
return ret;