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

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


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

avformat/rl2: use ff_get_extradata()

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

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

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

diff --git a/libavformat/rl2.c b/libavformat/rl2.c
index 56f4cf2..d354339 100644
--- a/libavformat/rl2.c
+++ b/libavformat/rl2.c
@@ -127,13 +127,9 @@ static av_cold int rl2_read_header(AVFormatContext *s)
     if(signature == RLV3_TAG && back_size > 0)
         st->codec->extradata_size += back_size;
 
-    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);
 
-    if(avio_read(pb,st->codec->extradata,st->codec->extradata_size) !=
-                      st->codec->extradata_size)
-        return AVERROR(EIO);
-
     /** setup audio stream if present */
     if(sound_rate){
         if (!channels || channels > 42) {



More information about the ffmpeg-cvslog mailing list