Commit 0b9ca702 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/riffdec: use ff_get_extradata()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent bb6101d4
......@@ -117,9 +117,8 @@ int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)
}
if (cbSize > 0) {
av_free(codec->extradata);
if (ff_alloc_extradata(codec, cbSize))
if (ff_get_extradata(codec, pb, cbSize) < 0)
return AVERROR(ENOMEM);
avio_read(pb, codec->extradata, codec->extradata_size);
size -= cbSize;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment