mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-28 23:13:18 +08:00
tl_matroska: fix minor memory leak in error case
Going the way of least resistance. Fixes #1460.
This commit is contained in:
committed by
Diogo Franco (Kovensky)
parent
77d5aa56b3
commit
1a3a52ea25
@@ -580,11 +580,13 @@ void build_ordered_chapter_timeline(struct MPContext *mpctx)
|
||||
}
|
||||
|
||||
if (!part_count) {
|
||||
// None of the parts come from the file itself???
|
||||
talloc_free(sources);
|
||||
talloc_free(timeline);
|
||||
talloc_free(chapters);
|
||||
return;
|
||||
// None of the parts come from the file itself???
|
||||
// Broken file, but we need at least 1 valid timeline part - add a dummy.
|
||||
MP_WARN(mpctx, "Ordered chapters file with no parts?\n");
|
||||
struct timeline_part new = {
|
||||
.source = demuxer,
|
||||
};
|
||||
MP_TARRAY_APPEND(NULL, timeline, part_count, new);
|
||||
}
|
||||
|
||||
struct timeline_part new = {
|
||||
|
||||
Reference in New Issue
Block a user