From 13644839b68d174ed745710c2b6ae592e7f771d6 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Wed, 21 Oct 2009 18:23:15 +0100 Subject: Fixed a bug which prevented "dvb://" working with the default configuration. --- src/input/input_dvb.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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; -- cgit v1.2.3