demux_mkv: don't crash if --ordered-chapters-files fails

It just crashed.
This commit is contained in:
wm4 2016-09-06 20:09:18 +02:00
parent 618d7f59b0
commit e66c098228
1 changed files with 1 additions and 1 deletions

View File

@ -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 "