|
|
@@ -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 |
|
|
|