X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fadxdec.c;h=0a0436f1847472bf9eb9c086a0e640aad3c99ce3;hb=62533eab6fb1d11e47bf88e31c02de454311e8c2;hp=38f09f4ca76f7684570469800f948a5750483477;hpb=d3850ac5b9c7e0f6cd77d652a3a8985c6ca6732a;p=ffmpeg diff --git a/libavformat/adxdec.c b/libavformat/adxdec.c index 38f09f4ca76..0a0436f1847 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);