[FFmpeg-cvslog] lavf/ffmenc: fix memleak in ffm_write_header

James Almer git at videolan.org
Tue Nov 18 17:46:09 CET 2014


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Nov 18 03:12:38 2014 -0300| [bccae39072c4bf2cf20d52900fecbf9c71de9b7e] | committer: James Almer

lavf/ffmenc: fix memleak in ffm_write_header

Regression since 745730c9c208c40f800d5d71ffa39aceab6ce044.
The dynamic buffer was not being used or freed.

Reviewed-by: Michael Niedermayer <michaelni at gmx.at>
Signed-off-by: James Almer <jamrial at gmail.com>

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

 libavformat/ffmenc.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/libavformat/ffmenc.c b/libavformat/ffmenc.c
index b717813..c64c26b 100644
--- a/libavformat/ffmenc.c
+++ b/libavformat/ffmenc.c
@@ -217,8 +217,6 @@ static int ffm_write_header(AVFormatContext *s)
             avio_write(pb, codec->extradata, codec->extradata_size);
         }
         write_header_chunk(s->pb, pb, MKBETAG('C', 'O', 'M', 'M'));
-        if(avio_open_dyn_buf(&pb) < 0)
-            return AVERROR(ENOMEM);
         /* specific info */
         switch(codec->codec_type) {
         case AVMEDIA_TYPE_VIDEO:



More information about the ffmpeg-cvslog mailing list