summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Farnsworth <simon.farnsworth@onelan.co.uk>2008-07-28 17:17:39 +0100
committerSimon Farnsworth <simon.farnsworth@onelan.co.uk>2008-07-28 17:17:39 +0100
commit785fb4931f9d50716810cb4cc2355133fb37b462 (patch)
treeb41fdc646b0857cf570c37307c34761ac01e7fa6
parenta5d25b426a852306d74c4e4ecf39b1e3de289945 (diff)
downloadxine-lib-785fb4931f9d50716810cb4cc2355133fb37b462.tar.gz
xine-lib-785fb4931f9d50716810cb4cc2355133fb37b462.tar.bz2
Only set the tuner if we're going to use it (fixes baseband video inputs)
-rw-r--r--ChangeLog2
-rw-r--r--src/input/input_v4l.c16
2 files changed, 8 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index f0066718d..274b18dda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,8 @@ xine-lib (1.1.15) 2008-??-??
others, there would be no problem.
* V4L changes:
- Delay preallocating video frames until we know how large they'll be
+ - Only try and set the tuner if we're going to use it. Setting the tuner
+ when using baseband video (CVBS, S-Video) breaks the input.
xine-lib (1.1.14) 2008-06-29
* DVB changes:
diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c
index 9e6b783e3..b97f11ace 100644
--- a/src/input/input_v4l.c
+++ b/src/input/input_v4l.c
@@ -549,6 +549,12 @@ static int set_frequency(v4l_input_plugin_t *this, unsigned long frequency)
fd = this->radio_fd;
if (frequency != 0) {
+ /* FIXME: Don't assume tuner 0 ? */
+ this->tuner = 0;
+ ret = ioctl(fd, VIDIOCSTUNER, &this->tuner);
+ lprintf("(%d) Response on set tuner to %d\n", ret, this->tuner);
+ this->video_tuner.tuner = this->tuner;
+
if (this->video_tuner.flags & VIDEO_TUNER_LOW) {
this->calc_frequency = frequency * 16;
} else {
@@ -683,16 +689,6 @@ static int search_by_channel(v4l_input_plugin_t *this, char *input_source)
ret = ioctl(fd, VIDIOCSCHAN, &this->input);
lprintf("(%d) Set channel to %d\n", ret, this->input);
-
- /* FIXME: Don't assume tuner 0 ? */
-
- this->tuner = 0;
-
- ret = ioctl(fd, VIDIOCSTUNER, &this->tuner);
-
- lprintf("(%d) Response on set tuner to %d\n", ret, this->tuner);
-
- this->video_tuner.tuner = this->tuner;
} else {
xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
"input_v4l: Not setting video source. No source given\n");