mirror of
https://github.com/mpv-player/mpv
synced 2025-03-06 22:28:01 +00:00
player: slightly better error reporting when opening file fails
Return MPV_ERROR_LOADING_FAILED instead of MPV_ERROR_NOTHING_TO_PLAY.
This commit is contained in:
parent
ed0bc8b64f
commit
2cfa62e651
@ -945,8 +945,13 @@ static void open_demux_thread(void *pctx)
|
||||
.stream_flags = args->stream_flags,
|
||||
};
|
||||
args->demux = demux_open_url(args->url, &p, args->cancel, global);
|
||||
if (!args->demux && p.demuxer_failed)
|
||||
args->err = MPV_ERROR_UNKNOWN_FORMAT;
|
||||
if (!args->demux) {
|
||||
if (p.demuxer_failed) {
|
||||
args->err = MPV_ERROR_UNKNOWN_FORMAT;
|
||||
} else {
|
||||
args->err = MPV_ERROR_LOADING_FAILED;
|
||||
}
|
||||
}
|
||||
if (args->demux)
|
||||
args->tl = timeline_load(global, args->log, args->demux);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user