mirror of https://github.com/mpv-player/mpv
tl_matroska: fix minor memory leak in error case
Going the way of least resistance. Fixes #1460.
This commit is contained in:
parent
8336563d23
commit
fcdbaf78f2
|
@ -541,11 +541,13 @@ void build_ordered_chapter_timeline(struct MPContext *mpctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!part_count) {
|
if (!part_count) {
|
||||||
// None of the parts come from the file itself???
|
// None of the parts come from the file itself???
|
||||||
talloc_free(sources);
|
// Broken file, but we need at least 1 valid timeline part - add a dummy.
|
||||||
talloc_free(timeline);
|
MP_WARN(mpctx, "Ordered chapters file with no parts?\n");
|
||||||
talloc_free(chapters);
|
struct timeline_part new = {
|
||||||
return;
|
.source = demuxer,
|
||||||
|
};
|
||||||
|
MP_TARRAY_APPEND(NULL, timeline, part_count, new);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct timeline_part new = {
|
struct timeline_part new = {
|
||||||
|
|
Loading…
Reference in New Issue