summaryrefslogtreecommitdiffstats
path: root/demux/timeline.c
diff options
context:
space:
mode:
Diffstat (limited to 'demux/timeline.c')
-rw-r--r--demux/timeline.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/demux/timeline.c b/demux/timeline.c
index 73f3ab79a2..700a6dfd05 100644
--- a/demux/timeline.c
+++ b/demux/timeline.c
@@ -33,8 +33,10 @@ void timeline_destroy(struct timeline *tl)
return;
for (int n = 0; n < tl->num_sources; n++) {
struct demuxer *d = tl->sources[n];
- if (d != tl->demuxer)
+ if (d != tl->demuxer && d != tl->track_layout)
free_demuxer_and_stream(d);
}
+ if (tl->track_layout && tl->track_layout != tl->demuxer)
+ free_demuxer_and_stream(tl->track_layout);
talloc_free(tl);
}