[FFmpeg-devel] [PATCH 35/41] avformat/idcin: use ff_alloc_extradata()

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


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

diff --git a/libavformat/idcin.c b/libavformat/idcin.c
index 85d538c..9671fca 100644
--- a/libavformat/idcin.c
+++ b/libavformat/idcin.c
@@ -196,10 +196,8 @@ static int idcin_read_header(AVFormatContext *s)
     st->codec->height = height;
 
     /* load up the Huffman tables into extradata */
-    st->codec->extradata = av_malloc(HUFFMAN_TABLE_SIZE);
-    if (!st->codec->extradata)
+    if (ff_alloc_extradata(st->codec, HUFFMAN_TABLE_SIZE))
         return AVERROR(ENOMEM);
-    st->codec->extradata_size = HUFFMAN_TABLE_SIZE;
     ret = avio_read(pb, st->codec->extradata, HUFFMAN_TABLE_SIZE);
     if (ret < 0) {
         return ret;
-- 
1.7.11.2



More information about the ffmpeg-devel mailing list