diff options
Diffstat (limited to 'libavformat/riffdec.c')
-rw-r--r-- | libavformat/riffdec.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c index e7c52e0..de8eb5f 100644 --- a/libavformat/riffdec.c +++ b/libavformat/riffdec.c @@ -115,12 +115,9 @@ int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size) cbSize -= 22; size -= 22; } - codec->extradata_size = cbSize; if (cbSize > 0) { av_free(codec->extradata); - codec->extradata = av_mallocz(codec->extradata_size + - FF_INPUT_BUFFER_PADDING_SIZE); - if (!codec->extradata) + if (ff_alloc_extradata(codec, cbSize)) return AVERROR(ENOMEM); avio_read(pb, codec->extradata, codec->extradata_size); size -= cbSize; |