From bccae39072c4bf2cf20d52900fecbf9c71de9b7e Mon Sep 17 00:00:00 2001 From: James Almer Date: Tue, 18 Nov 2014 03:12:38 -0300 Subject: [PATCH] lavf/ffmenc: fix memleak in ffm_write_header Regression since 745730c9c208c40f800d5d71ffa39aceab6ce044. The dynamic buffer was not being used or freed. Reviewed-by: Michael Niedermayer Signed-off-by: James Almer --- libavformat/ffmenc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavformat/ffmenc.c b/libavformat/ffmenc.c index b717813efc..c64c26b5c8 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: