diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-25 16:37:42 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-25 17:38:29 +0100 |
commit | 215759a9252b48bc242b611c4615292d7ba6ad88 (patch) | |
tree | 19ac521d894f58d8f3acfb518258f00c51c8ff77 /libavformat/idcin.c | |
parent | d8d5258bb7e84f2fc1ff57d1361ba71ec4f1d118 (diff) | |
download | ffmpeg-215759a9252b48bc242b611c4615292d7ba6ad88.tar.gz |
avformat/idcin: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/idcin.c')
-rw-r--r-- | libavformat/idcin.c | 9 |
1 files changed, 1 insertions, 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; |