summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2014-01-13 14:43:23 +0200
committerMartin Storsjö <martin@martin.st>2014-01-15 09:57:26 +0200
commitd51f09962d5b4bc999fb70c040f330dd1873212e (patch)
tree475cc024c6374fff09e2de121f426c8afd27eb15 /libavformat/mov.c
parentd0cd2a8c461f975eeaeff2900e95fa8ec0931ef8 (diff)
mov: Free intermediate arrays in the normal cleanup function
These arrays are normally freed at the end of mov_read_trak, but make sure they're freed in case mov_read_trak returned early (due to errors) or in case the atoms that allocate arrays are encountered at some other point than within a trak (which we don't have checks against). Sample-Id: 00000496-google Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 9b019e183b..b7823bf2f6 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2829,6 +2829,14 @@ static int mov_read_close(AVFormatContext *s)
av_freep(&sc->drefs);
if (sc->pb && sc->pb != s->pb)
avio_close(sc->pb);
+
+ av_freep(&sc->chunk_offsets);
+ av_freep(&sc->stsc_data);
+ av_freep(&sc->sample_sizes);
+ av_freep(&sc->keyframes);
+ av_freep(&sc->stts_data);
+ av_freep(&sc->stps_data);
+ av_freep(&sc->rap_group);
}
if (mov->dv_demux) {