summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Shield <twshield@users.sourceforge.net>2007-11-13 14:28:16 +0000
committerTom Shield <twshield@users.sourceforge.net>2007-11-13 14:28:16 +0000
commit45cd8a599c5ab8f7207317e3366cb0a73e985c16 (patch)
treef20b16f161172fc340dadabed8eb666953e4914a
parenta9cbb5fe22069787eead020f15f06574a178d44f (diff)
downloadxine-lib-45cd8a599c5ab8f7207317e3366cb0a73e985c16.tar.gz
xine-lib-45cd8a599c5ab8f7207317e3366cb0a73e985c16.tar.bz2
Missing channels.conf (ATSC)
load_channels was being called without checking the tuner fontend type, so channels.conf could not be decoded. Tested for ATSC only.
-rw-r--r--src/input/input_dvb.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c
index 14d109734..795b843c5 100644
--- a/src/input/input_dvb.c
+++ b/src/input/input_dvb.c
@@ -3187,7 +3187,20 @@ static char **dvb_class_get_autoplay_list(input_class_t * this_gen,
xine_cfg_entry_t lastchannel_enable = {0};
xine_cfg_entry_t lastchannel;
- if (!(channels = load_channels(class->xine, NULL, &num_channels, 0))) {
+ /* need to probe card here to get fe_type to read in channels.conf */
+ tuner_t *tuner;
+ xine_cfg_entry_t adapter;
+
+ xine_config_lookup_entry(class->xine, "media.dvb.adapter", &adapter);
+
+ if (!(tuner = tuner_init(class->xine,adapter.num_value))) {
+ xprintf(class->xine, XINE_VERBOSITY_LOG, _("input_dvb: cannot open dvb device\n"));
+ class->mrls[0]="Sorry, No DVB input device found.";
+ *num_files=1;
+ return class->mrls;
+ }
+
+ if (!(channels = load_channels(class->xine, NULL, &num_channels, tuner->feinfo.type))) {
/* channels.conf not found in .xine */
class->mrls[0]="Sorry, No valid channels.conf found";
class->mrls[1]="for the selected DVB device.";
@@ -3195,9 +3208,12 @@ static char **dvb_class_get_autoplay_list(input_class_t * this_gen,
class->mrls[3]="from the dvb drivers apps package";
class->mrls[4]="and place the file in ~/.xine/";
*num_files=5;
+ tuner_dispose(tuner);
return class->mrls;
}
+ tuner_dispose(tuner);
+
if (xine_config_lookup_entry(class->xine, "media.dvb.remember_channel", &lastchannel_enable)
&& lastchannel_enable.num_value
&& xine_config_lookup_entry(class->xine, "media.dvb.last_channel", &lastchannel))