summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-08-29 17:53:21 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-08-29 17:53:21 +0000
commite55229aea112835fac5d2295771f8ef7eb7495a6 (patch)
tree33778be86a2849f331569d7cd470a9df144e325e /src
parentb141fb58290aec442a34cdb81a5661bb3aa4e926 (diff)
downloadxine-lib-e55229aea112835fac5d2295771f8ef7eb7495a6.tar.gz
xine-lib-e55229aea112835fac5d2295771f8ef7eb7495a6.tar.bz2
workaround an ivtv bug where stream gets bad mpeg2 artifacts
after changing inputs. reopening the device fixes it. CVS patchset: 5317 CVS date: 2003/08/29 17:53:21
Diffstat (limited to 'src')
-rw-r--r--src/input/input_pvr.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/input/input_pvr.c b/src/input/input_pvr.c
index 55de16099..017c23fb3 100644
--- a/src/input/input_pvr.c
+++ b/src/input/input_pvr.c
@@ -38,7 +38,7 @@
* usage:
* xine pvr:/<prefix_to_tmp_files>\!<prefix_to_saved_files>\!<max_page_age>
*
- * $Id: input_pvr.c,v 1.31 2003/08/09 23:15:46 miguelfreitas Exp $
+ * $Id: input_pvr.c,v 1.32 2003/08/29 17:53:21 miguelfreitas Exp $
*/
/**************************************************************************
@@ -1056,6 +1056,16 @@ static void pvr_event_handler (pvr_input_plugin_t *this) {
vf.tuner = 0;
if( ioctl(this->dev_fd, VIDIOC_S_FREQUENCY, &vf) )
printf("input_pvr: error setting v4l2 frequency\n");
+
+ /* workaround an ivtv bug where stream gets bad mpeg2 artifacts
+ * after changing inputs. reopening the device fixes it.
+ */
+ close(this->dev_fd);
+ this->dev_fd = open (PVR_DEVICE, O_RDWR);
+ if (this->dev_fd == -1) {
+ printf("input_pvr: error opening device %s\n", PVR_DEVICE );
+ return;
+ }
#else
v.norm = VIDEO_MODE_NTSC;
v.channel = this->input;