mirror of https://github.com/mpv-player/mpv
stream_dvb: fix channels.conf preference order
channels.conf was never used (even though its config path was resolved). Also remove the non-sense with the access() call. Fixes #987 (untested).
This commit is contained in:
parent
19fd67096b
commit
796db66174
|
@ -750,7 +750,6 @@ dvb_config_t *dvb_get_config(stream_t *stream)
|
||||||
}
|
}
|
||||||
|
|
||||||
void *talloc_ctx = talloc_new(NULL);
|
void *talloc_ctx = talloc_new(NULL);
|
||||||
conf_file = mp_find_config_file(talloc_ctx, global, "channels.conf");
|
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case TUNER_TER:
|
case TUNER_TER:
|
||||||
conf_file = mp_find_config_file(talloc_ctx, global, "channels.conf.ter");
|
conf_file = mp_find_config_file(talloc_ctx, global, "channels.conf.ter");
|
||||||
|
@ -765,9 +764,11 @@ dvb_config_t *dvb_get_config(stream_t *stream)
|
||||||
conf_file = mp_find_config_file(talloc_ctx, global, "channels.conf.atsc");
|
conf_file = mp_find_config_file(talloc_ctx, global, "channels.conf.atsc");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (conf_file) {
|
||||||
if(conf_file && (access(conf_file, F_OK | R_OK) != 0))
|
mp_verbose(log, "Ignoring other channels.conf files.\n");
|
||||||
|
} else {
|
||||||
conf_file = mp_find_config_file(talloc_ctx, global, "channels.conf");
|
conf_file = mp_find_config_file(talloc_ctx, global, "channels.conf");
|
||||||
|
}
|
||||||
|
|
||||||
list = dvb_get_channels(log, conf_file, type);
|
list = dvb_get_channels(log, conf_file, type);
|
||||||
talloc_free(talloc_ctx);
|
talloc_free(talloc_ctx);
|
||||||
|
|
Loading…
Reference in New Issue