]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/adxdec.c
ffv1enc: use 64bit in maxsize calculation
[ffmpeg] / libavformat / adxdec.c
index 38f09f4ca76f7684570469800f948a5750483477..0a0436f1847472bf9eb9c086a0e640aad3c99ce3 100644 (file)
@@ -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);