[FFmpeg-devel] [PATCH 14/41] avformat/nuv: use ff_alloc_extradata()

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


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

diff --git a/libavformat/nuv.c b/libavformat/nuv.c
index fc9e916..32d0e02 100644
--- a/libavformat/nuv.c
+++ b/libavformat/nuv.c
@@ -86,10 +86,8 @@ static int get_codec_data(AVIOContext *pb, AVStream *vst,
                     av_freep(&vst->codec->extradata);
                     vst->codec->extradata_size = 0;
                 }
-                vst->codec->extradata = av_malloc(size);
-                if (!vst->codec->extradata)
+                if (ff_alloc_extradata(vst->codec, size))
                     return AVERROR(ENOMEM);
-                vst->codec->extradata_size = size;
                 avio_read(pb, vst->codec->extradata, size);
                 size = 0;
                 if (!myth)
-- 
1.7.11.2



More information about the ffmpeg-devel mailing list