mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
avformat/avidec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f04fc386dc
commit
e93bc3efbf
@ -654,11 +654,8 @@ static int avi_read_header(AVFormatContext *s)
|
||||
st->codec->extradata_size = esize - 10 * 4;
|
||||
} else
|
||||
st->codec->extradata_size = size - 10 * 4;
|
||||
if (ff_alloc_extradata(st->codec, st->codec->extradata_size))
|
||||
if (ff_get_extradata(st->codec, pb, st->codec->extradata_size) < 0)
|
||||
return AVERROR(ENOMEM);
|
||||
avio_read(pb,
|
||||
st->codec->extradata,
|
||||
st->codec->extradata_size);
|
||||
}
|
||||
|
||||
// FIXME: check if the encoder really did this correctly
|
||||
@ -783,9 +780,8 @@ static int avi_read_header(AVFormatContext *s)
|
||||
st = s->streams[stream_index];
|
||||
|
||||
if (size<(1<<30)) {
|
||||
if (ff_alloc_extradata(st->codec, size))
|
||||
if (ff_get_extradata(st->codec, pb, size) < 0)
|
||||
return AVERROR(ENOMEM);
|
||||
avio_read(pb, st->codec->extradata, st->codec->extradata_size);
|
||||
}
|
||||
|
||||
if (st->codec->extradata_size & 1) //FIXME check if the encoder really did this correctly
|
||||
|
Loading…
x
Reference in New Issue
Block a user