[FFmpeg-devel] [PATCH 19/41] avformat/mvi: use ff_alloc_extradata()

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


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

diff --git a/libavformat/mvi.c b/libavformat/mvi.c
index bd1f3c6..5efc443 100644
--- a/libavformat/mvi.c
+++ b/libavformat/mvi.c
@@ -52,9 +52,7 @@ static int read_header(AVFormatContext *s)
     if (!vst)
         return AVERROR(ENOMEM);
 
-    vst->codec->extradata_size = 2;
-    vst->codec->extradata = av_mallocz(2 + FF_INPUT_BUFFER_PADDING_SIZE);
-    if (!vst->codec->extradata)
+    if (ff_alloc_extradata(vst->codec, 2))
         return AVERROR(ENOMEM);
 
     version                  = avio_r8(pb);
-- 
1.7.11.2



More information about the ffmpeg-devel mailing list