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

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


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

avformat/ffmdec: use ff_get_extradata()

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

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

 libavformat/ffmdec.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index 679d926..9d89b16 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -280,9 +280,8 @@ static int ffm2_read_header(AVFormatContext *s)
             codec->flags2 = avio_rb32(pb);
             codec->debug = avio_rb32(pb);
             if (codec->flags & CODEC_FLAG_GLOBAL_HEADER) {
-                if (ff_alloc_extradata(codec, avio_rb32(pb)))
+                if (ff_get_extradata(codec, pb, avio_rb32(pb)) < 0)
                     return AVERROR(ENOMEM);
-                avio_read(pb, codec->extradata, codec->extradata_size);
             }
             avio_seek(pb, next, SEEK_SET);
             id = avio_rb32(pb);
@@ -468,9 +467,8 @@ static int ffm_read_header(AVFormatContext *s)
             goto fail;
         }
         if (codec->flags & CODEC_FLAG_GLOBAL_HEADER) {
-            if (ff_alloc_extradata(codec, avio_rb32(pb)))
+            if (ff_get_extradata(codec, pb, avio_rb32(pb)) < 0)
                 return AVERROR(ENOMEM);
-            avio_read(pb, codec->extradata, codec->extradata_size);
         }
     }
 



More information about the ffmpeg-cvslog mailing list