avformat/anm: use ff_get_extradata()
This commit is contained in:
parent
e8d36ba477
commit
37af319086
@ -132,12 +132,7 @@ static int read_header(AVFormatContext *s)
|
|||||||
avio_skip(pb, 58);
|
avio_skip(pb, 58);
|
||||||
|
|
||||||
/* color cycling and palette data */
|
/* color cycling and palette data */
|
||||||
st->codecpar->extradata_size = 16*8 + 4*256;
|
ret = ff_get_extradata(s, st->codecpar, s->pb, 16*8 + 4*256);
|
||||||
st->codecpar->extradata = av_mallocz(st->codecpar->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
|
|
||||||
if (!st->codecpar->extradata) {
|
|
||||||
return AVERROR(ENOMEM);
|
|
||||||
}
|
|
||||||
ret = avio_read(pb, st->codecpar->extradata, st->codecpar->extradata_size);
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user