[FFmpeg-cvslog] avformat/adxdec: use ff_get_extradata()

Michael Niedermayer git at videolan.org
Wed Dec 25 17:48:52 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 25 16:37:42 2013 +0100| [482b2042cdb05f77cc4d82a07c010203ac7a4f08] | committer: Michael Niedermayer

avformat/adxdec: use ff_get_extradata()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=482b2042cdb05f77cc4d82a07c010203ac7a4f08
---

 libavformat/adxdec.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/libavformat/adxdec.c b/libavformat/adxdec.c
index 0a0436f..fe22c3a 100644
--- a/libavformat/adxdec.c
+++ b/libavformat/adxdec.c
@@ -78,13 +78,8 @@ static int adx_read_header(AVFormatContext *s)
     c->header_size = avio_rb16(s->pb) + 4;
     avio_seek(s->pb, -4, SEEK_CUR);
 
-    if (ff_alloc_extradata(avctx, c->header_size))
+    if (ff_get_extradata(avctx, s->pb, c->header_size) < 0)
         return AVERROR(ENOMEM);
-    if (avio_read(s->pb, avctx->extradata, c->header_size) < c->header_size) {
-        av_freep(&avctx->extradata);
-        return AVERROR(EIO);
-    }
-    avctx->extradata_size = c->header_size;
 
     ret = avpriv_adx_decode_header(avctx, avctx->extradata,
                                    avctx->extradata_size, &c->header_size,



More information about the ffmpeg-cvslog mailing list