summaryrefslogtreecommitdiffstats
path: root/libavformat/riffdec.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-10-13 10:30:59 +0000
committerPaul B Mahol <onemda@gmail.com>2013-10-13 20:13:38 +0000
commita807c68253b02cce8b9fbc87d7857c31d531a1ee (patch)
treee4097d5fd4a2cf8dc03c6f97ebfadc4d20ce8ac2 /libavformat/riffdec.c
parent3fd79833e266aec2d77cf07092e8b1406fd307d4 (diff)
downloadffmpeg-streaming-a807c68253b02cce8b9fbc87d7857c31d531a1ee.zip
ffmpeg-streaming-a807c68253b02cce8b9fbc87d7857c31d531a1ee.tar.gz
avformat: use ff_alloc_extradata()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/riffdec.c')
-rw-r--r--libavformat/riffdec.c5
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;
OpenPOWER on IntegriCloud