[FFmpeg-devel] [PATCH 04/41] avformat/libnut: use ff_alloc_extradata()

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


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

diff --git a/libavformat/libnut.c b/libavformat/libnut.c
index 7147998..be8f3cb 100644
--- a/libavformat/libnut.c
+++ b/libavformat/libnut.c
@@ -232,8 +232,7 @@ static int nut_read_header(AVFormatContext * avf) {
 
         st->codec->extradata_size = s[i].codec_specific_len;
         if (st->codec->extradata_size) {
-            st->codec->extradata = av_mallocz(st->codec->extradata_size);
-            if(!st->codec->extradata){
+            if(ff_alloc_extradata(st->codec, st->codec->extradata_size)){
                 nut_demuxer_uninit(nut);
                 priv->nut = NULL;
                 return AVERROR(ENOMEM);
-- 
1.7.11.2



More information about the ffmpeg-devel mailing list