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

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


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

avformat/isom: use ff_get_extradata()

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

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

 libavformat/isom.c |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/libavformat/isom.c b/libavformat/isom.c
index da789d6..f6a4646 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -458,13 +458,8 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext
         if (!len || (uint64_t)len > (1<<30))
             return -1;
         av_free(st->codec->extradata);
-        if (ff_alloc_extradata(st->codec, len))
-            return AVERROR(ENOMEM);
-        if ((ret = avio_read(pb, st->codec->extradata, len)) != len) {
-            av_freep(&st->codec->extradata);
-            st->codec->extradata_size = 0;
-            return ret < 0 ? ret : AVERROR_INVALIDDATA;
-        }
+        if ((ret = ff_get_extradata(st->codec, pb, len)) < 0)
+            return ret;
         if (st->codec->codec_id == AV_CODEC_ID_AAC) {
             MPEG4AudioConfig cfg = {0};
             avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata,



More information about the ffmpeg-cvslog mailing list