summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-15 22:27:20 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-15 23:31:51 +0200
commit35e0496a7bb7243ce3574ab971bd489c7f7a0876 (patch)
tree3c6145906ffd6f4342c9b41d17af6ec78b7e94ad /libavformat/mov.c
parent88a97d660d65b8d5ac2ca719969c0096ace00114 (diff)
parent3892e784f2225b32c87a5996347994f108fbd369 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: doc: Improve suggested Emacs settings for our coding style. utvideo: Remove unused variable 'src_size' mov: free memory on header parsing failure mov: fix leaking memory with multiple drefs. swscale: clip before assigning tables in RGB output functions. swscale: fix off-by-one in second coefficient in bilinear filters. Conflicts: libavformat/mov.c libswscale/output.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index f7ae19ab9f..004c4c47ea 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -400,6 +400,7 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
entries = avio_rb32(pb);
if (entries >= UINT_MAX / sizeof(*sc->drefs))
return AVERROR_INVALIDDATA;
+ av_free(sc->drefs);
sc->drefs = av_mallocz(entries * sizeof(*sc->drefs));
if (!sc->drefs)
return AVERROR(ENOMEM);
@@ -3039,6 +3040,7 @@ static const AVOption options[] = {
};
static const AVClass class = {"mov,mp4,m4a,3gp,3g2,mj2", av_default_item_name, options, LIBAVUTIL_VERSION_INT};
+
AVInputFormat ff_mov_demuxer = {
.name = "mov,mp4,m4a,3gp,3g2,mj2",
.long_name = NULL_IF_CONFIG_SMALL("QuickTime/MPEG-4/Motion JPEG 2000 format"),