mirror of
https://github.com/mpv-player/mpv
synced 2025-03-08 07:08:12 +00:00
demux: error out if given invalid -demuxer option
The code choosing the demuxer to use only printed an error if given an unknown demuxer name, then continued with default demuxer selection. Change it to abort instead. This feels like more sensible behavior. Also there's no fallback to autodetection in the case where the demuxer name is recognized but the demuxer fails to open the file either.
This commit is contained in:
parent
8fb91511b1
commit
7b076f79a9
@ -1133,18 +1133,23 @@ demuxer_t *demux_open(struct MPOpts *opts, stream_t *vs, int file_format,
|
||||
get_demuxer_type_from_name(demuxer_name, &demuxer_force)) < 0) {
|
||||
mp_msg(MSGT_DEMUXER, MSGL_ERR, "-demuxer %s does not exist.\n",
|
||||
demuxer_name);
|
||||
return NULL;
|
||||
}
|
||||
if ((audio_demuxer_type =
|
||||
get_demuxer_type_from_name(audio_demuxer_name,
|
||||
&audio_demuxer_force)) < 0) {
|
||||
mp_msg(MSGT_DEMUXER, MSGL_ERR, "-audio-demuxer %s does not exist.\n",
|
||||
audio_demuxer_name);
|
||||
if (audio_stream)
|
||||
return NULL;
|
||||
}
|
||||
if ((sub_demuxer_type =
|
||||
get_demuxer_type_from_name(sub_demuxer_name,
|
||||
&sub_demuxer_force)) < 0) {
|
||||
mp_msg(MSGT_DEMUXER, MSGL_ERR, "-sub-demuxer %s does not exist.\n",
|
||||
sub_demuxer_name);
|
||||
if (sub_stream)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (audio_stream) {
|
||||
|
Loading…
Reference in New Issue
Block a user