mirror of
https://github.com/librempeg/librempeg
synced 2024-11-22 18:49:58 +00:00
avformat/rsd: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
fd335aa326
commit
2e2cab6e4f
@ -104,13 +104,10 @@ static int rsd_read_header(AVFormatContext *s)
|
|||||||
/* RSD3GADP is mono, so only alloc enough memory
|
/* RSD3GADP is mono, so only alloc enough memory
|
||||||
to store the coeff table for a single channel. */
|
to store the coeff table for a single channel. */
|
||||||
|
|
||||||
if (ff_alloc_extradata(codec, 32))
|
|
||||||
return AVERROR(ENOMEM);
|
|
||||||
|
|
||||||
start = avio_rl32(pb);
|
start = avio_rl32(pb);
|
||||||
|
|
||||||
if (avio_read(s->pb, codec->extradata, 32) != 32)
|
if (ff_get_extradata(codec, s->pb, 32) < 0)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
AV_WB16(codec->extradata + i * 2, AV_RL16(codec->extradata + i * 2));
|
AV_WB16(codec->extradata + i * 2, AV_RL16(codec->extradata + i * 2));
|
||||||
|
Loading…
Reference in New Issue
Block a user