[FFmpeg-cvslog] mov: Don't allocate arrays with av_malloc that will be realloced

Martin Storsjö git at videolan.org
Sun Jan 12 16:57:21 CET 2014


ffmpeg | branch: release/1.1 | Martin Storsjö <martin at martin.st> | Fri Oct  4 09:52:02 2013 +0300| [d149c14a2263cf17e09a18e577b7a99043e26fbc] | committer: Reinhard Tartler

mov: Don't allocate arrays with av_malloc that will be realloced

CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit b698542ad83284fbb8c22404e3cafeb2dd739d38)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d149c14a2263cf17e09a18e577b7a99043e26fbc
---

 libavformat/mov.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 6b89a2d..8c54706 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2313,7 +2313,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
     if (!sc->ctts_count && sc->sample_count)
     {
         /* Complement ctts table if moov atom doesn't have ctts atom. */
-        ctts_data = av_malloc(sizeof(*sc->ctts_data));
+        ctts_data = av_realloc(NULL, sizeof(*sc->ctts_data));
         if (!ctts_data)
             return AVERROR(ENOMEM);
         sc->ctts_data = ctts_data;



More information about the ffmpeg-cvslog mailing list