[FFmpeg-devel] [PATCH 09/41] avformat/adxdec: use ff_alloc_extradata()
Paul B Mahol
onemda at gmail.com
Sun Oct 13 14:48:30 CEST 2013
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavformat/adxdec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavformat/adxdec.c b/libavformat/adxdec.c
index 38f09f4..0a0436f 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);
--
1.7.11.2
More information about the ffmpeg-devel
mailing list