From 0b9ca70243c43cb95b5d596a827a2b748061dd2d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 25 Dec 2013 16:37:42 +0100 Subject: [PATCH] avformat/riffdec: use ff_get_extradata() Signed-off-by: Michael Niedermayer --- libavformat/riffdec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c index de8eb5f588..559ca47df8 100644 --- a/libavformat/riffdec.c +++ b/libavformat/riffdec.c @@ -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; }