diff options
author | Simon Farnsworth <simon.farnsworth@onelan.co.uk> | 2008-07-28 17:17:39 +0100 |
---|---|---|
committer | Simon Farnsworth <simon.farnsworth@onelan.co.uk> | 2008-07-28 17:17:39 +0100 |
commit | 785fb4931f9d50716810cb4cc2355133fb37b462 (patch) | |
tree | b41fdc646b0857cf570c37307c34761ac01e7fa6 | |
parent | a5d25b426a852306d74c4e4ecf39b1e3de289945 (diff) | |
download | xine-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-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/input/input_v4l.c | 16 |
2 files changed, 8 insertions, 10 deletions
@@ -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"); |