[FFmpeg-cvslog] avformat/avidec: 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| [e93bc3efbf756b5ffc402c64df38852829f10382] | committer: Michael Niedermayer

avformat/avidec: use ff_get_extradata()

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

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

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

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 1c6b18c..17eb245 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -654,11 +654,8 @@ static int avi_read_header(AVFormatContext *s)
                             st->codec->extradata_size = esize - 10 * 4;
                         } else
                             st->codec->extradata_size =  size - 10 * 4;
-                        if (ff_alloc_extradata(st->codec, st->codec->extradata_size))
+                        if (ff_get_extradata(st->codec, pb, st->codec->extradata_size) < 0)
                             return AVERROR(ENOMEM);
-                        avio_read(pb,
-                                  st->codec->extradata,
-                                  st->codec->extradata_size);
                     }
 
                     // FIXME: check if the encoder really did this correctly
@@ -783,9 +780,8 @@ static int avi_read_header(AVFormatContext *s)
                 st = s->streams[stream_index];
 
                 if (size<(1<<30)) {
-                    if (ff_alloc_extradata(st->codec, size))
+                    if (ff_get_extradata(st->codec, pb, size) < 0)
                         return AVERROR(ENOMEM);
-                    avio_read(pb, st->codec->extradata, st->codec->extradata_size);
                 }
 
                 if (st->codec->extradata_size & 1) //FIXME check if the encoder really did this correctly



More information about the ffmpeg-cvslog mailing list