summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2009-10-21 18:23:15 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2009-10-21 18:23:15 +0100
commit13644839b68d174ed745710c2b6ae592e7f771d6 (patch)
treef9cd8fc9d6c7ddab0a45f5e4367f5c9e6e5ee47e
parent6efc8270ef8f75a842930a0f703cb3539f106d4b (diff)
downloadxine-lib-13644839b68d174ed745710c2b6ae592e7f771d6.tar.gz
xine-lib-13644839b68d174ed745710c2b6ae592e7f771d6.tar.bz2
Fixed a bug which prevented "dvb://" working with the default configuration.
-rw-r--r--ChangeLog2
-rw-r--r--src/input/input_dvb.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 9919a08f2..f8ba8a1e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,8 @@ xine-lib (1.1.17) 2009-??-??
* Reworked Matroska demuxer. Now reads files created by mkvmerge 2.7.0.
* Support BluRay/HDMV streams & subtitles.
* The XML parser & lexer code now has re-entrancy.
+ * Fixed a bug which prevented "dvb://" (no channel specified) working with
+ the default configuration.
xine-lib (1.1.16.3) 2009-04-03
* Security fixes:
diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c
index 5060757e4..54c40087e 100644
--- a/src/input/input_dvb.c
+++ b/src/input/input_dvb.c
@@ -2875,6 +2875,8 @@ static int dvb_plugin_open(input_plugin_t * this_gen)
if (lastchannel.num_value) {
if (xine_config_lookup_entry(this->class->xine, "media.dvb.last_channel", &lastchannel)){
this->channel = lastchannel.num_value -1;
+ if (this->channel < 0 || this->channel >= num_channels)
+ this->channel = 0; /* out of range? default */
}else{
xprintf(this->class->xine, XINE_VERBOSITY_LOG, _("input_dvb: invalid channel specification, defaulting to channel 0\n"));
this->channel = 0;