summaryrefslogtreecommitdiff
path: root/libavformat/adxdec.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/adxdec.c
parent3fd79833e266aec2d77cf07092e8b1406fd307d4 (diff)
avformat: use ff_alloc_extradata()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/adxdec.c')
-rw-r--r--libavformat/adxdec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/adxdec.c b/libavformat/adxdec.c
index 38f09f4ca7..0a0436f184 100644
--- a/libavformat/adxdec.c
+++ b/libavformat/adxdec.c
@@ -78,8 +78,7 @@ static int adx_read_header(AVFormatContext *s)
c->header_size = avio_rb16(s->pb) + 4;
avio_seek(s->pb, -4, SEEK_CUR);
- avctx->extradata = av_mallocz(c->header_size + FF_INPUT_BUFFER_PADDING_SIZE);
- if (!avctx->extradata)
+ if (ff_alloc_extradata(avctx, c->header_size))
return AVERROR(ENOMEM);
if (avio_read(s->pb, avctx->extradata, c->header_size) < c->header_size) {
av_freep(&avctx->extradata);