[FFmpeg-devel] [PATCH 26/41] avformat/sierravmd: use ff_alloc_extradata()

Paul B Mahol onemda at gmail.com
Sun Oct 13 14:48:47 CEST 2013


Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 libavformat/sierravmd.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavformat/sierravmd.c b/libavformat/sierravmd.c
index fad3dd3..8749ec1 100644
--- a/libavformat/sierravmd.c
+++ b/libavformat/sierravmd.c
@@ -127,10 +127,8 @@ static int vmd_read_header(AVFormatContext *s)
             vst->codec->width >>= 1;
             vst->codec->height >>= 1;
         }
-        vst->codec->extradata = av_mallocz(VMD_HEADER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
-        if (!vst->codec->extradata)
+        if (ff_alloc_extradata(vst->codec, VMD_HEADER_SIZE))
             return AVERROR(ENOMEM);
-        vst->codec->extradata_size = VMD_HEADER_SIZE;
         memcpy(vst->codec->extradata, vmd->vmd_header, VMD_HEADER_SIZE);
     }
 
-- 
1.7.11.2



More information about the ffmpeg-devel mailing list