mirror of https://github.com/mpv-player/mpv
demux_mkv: don't crash if --ordered-chapters-files fails
It just crashed.
This commit is contained in:
parent
618d7f59b0
commit
e66c098228
|
@ -260,7 +260,7 @@ static void find_ordered_chapter_sources(struct tl_ctx *ctx)
|
||||||
struct playlist *pl =
|
struct playlist *pl =
|
||||||
playlist_parse_file(opts->ordered_chapters_files, ctx->global);
|
playlist_parse_file(opts->ordered_chapters_files, ctx->global);
|
||||||
talloc_steal(tmp, pl);
|
talloc_steal(tmp, pl);
|
||||||
for (struct playlist_entry *e = pl->first; e; e = e->next)
|
for (struct playlist_entry *e = pl ? pl->first : NULL; e; e = e->next)
|
||||||
MP_TARRAY_APPEND(tmp, filenames, num_filenames, e->filename);
|
MP_TARRAY_APPEND(tmp, filenames, num_filenames, e->filename);
|
||||||
} else if (ctx->demuxer->stream->uncached_type != STREAMTYPE_FILE) {
|
} else if (ctx->demuxer->stream->uncached_type != STREAMTYPE_FILE) {
|
||||||
MP_WARN(ctx, "Playback source is not a "
|
MP_WARN(ctx, "Playback source is not a "
|
||||||
|
|
Loading…
Reference in New Issue