X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Friffdec.c;h=559ca47df86df4f5664e0d48aebd2e0f38a5cdf5;hb=d04aceb7d03233ccdfb572802593961830e695a6;hp=de8eb5f5885442fbf55a655d218df07db75e0022;hpb=70d6ce783cc508f99c011438f2927b1a074dea56;p=ffmpeg diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c index de8eb5f5885..559ca47df86 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; }