From 215759a9252b48bc242b611c4615292d7ba6ad88 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 25 Dec 2013 16:37:42 +0100 Subject: [PATCH] avformat/idcin: use ff_get_extradata() Signed-off-by: Michael Niedermayer --- libavformat/idcin.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/libavformat/idcin.c b/libavformat/idcin.c index f2d5548a4f..cc25fb0e38 100644 --- a/libavformat/idcin.c +++ b/libavformat/idcin.c @@ -205,15 +205,8 @@ static int idcin_read_header(AVFormatContext *s) st->codec->height = height; /* load up the Huffman tables into extradata */ - if (ff_alloc_extradata(st->codec, HUFFMAN_TABLE_SIZE)) - return AVERROR(ENOMEM); - ret = avio_read(pb, st->codec->extradata, HUFFMAN_TABLE_SIZE); - if (ret < 0) { + if ((ret = ff_get_extradata(st->codec, pb, HUFFMAN_TABLE_SIZE)) < 0) return ret; - } else if (ret != HUFFMAN_TABLE_SIZE) { - av_log(s, AV_LOG_ERROR, "incomplete header\n"); - return AVERROR(EIO); - } if (idcin->audio_present) { idcin->audio_present = 1;