mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2025-02-17 18:38:13 +00:00
avformat/idcin: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
d8d5258bb7
commit
215759a925
@ -205,15 +205,8 @@ static int idcin_read_header(AVFormatContext *s)
|
|||||||
st->codec->height = height;
|
st->codec->height = height;
|
||||||
|
|
||||||
/* load up the Huffman tables into extradata */
|
/* load up the Huffman tables into extradata */
|
||||||
if (ff_alloc_extradata(st->codec, HUFFMAN_TABLE_SIZE))
|
if ((ret = ff_get_extradata(st->codec, pb, HUFFMAN_TABLE_SIZE)) < 0)
|
||||||
return AVERROR(ENOMEM);
|
|
||||||
ret = avio_read(pb, st->codec->extradata, HUFFMAN_TABLE_SIZE);
|
|
||||||
if (ret < 0) {
|
|
||||||
return ret;
|
return ret;
|
||||||
} else if (ret != HUFFMAN_TABLE_SIZE) {
|
|
||||||
av_log(s, AV_LOG_ERROR, "incomplete header\n");
|
|
||||||
return AVERROR(EIO);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (idcin->audio_present) {
|
if (idcin->audio_present) {
|
||||||
idcin->audio_present = 1;
|
idcin->audio_present = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user