From e55229aea112835fac5d2295771f8ef7eb7495a6 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Fri, 29 Aug 2003 17:53:21 +0000 Subject: 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 --- src/input/input_pvr.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src') 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:/\!\! * - * $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; -- cgit v1.2.3