[FFmpeg-cvslog] asf: don't seek back on EOF.

Ronald S. Bultje git at videolan.org
Mon Apr 2 01:45:13 CEST 2012


ffmpeg | branch: release/0.8 | Ronald S. Bultje <rsbultje at gmail.com> | Tue Feb 28 16:13:46 2012 -0800| [a2d5e741a889bfed621e18a94ff266d49d280557] | committer: Reinhard Tartler

asf: don't seek back on EOF.

Seeking back on EOF will reset the EOF flag, causing us to re-enter
the loop to find the next marker in the ASF file, thus potentially
causing an infinite loop.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
(cherry picked from commit bb6d5411e1e1a8e0608b1af1c4addee654dcbac5)

Signed-off-by: Reinhard Tartler <siretart at tauware.de>

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

 libavformat/asfdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 6172170..47d5b19 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -761,7 +761,7 @@ static int ff_asf_get_packet(AVFormatContext *s, AVIOContext *pb)
         c= avio_r8(pb);
         d= avio_r8(pb);
         rsize+=3;
-    }else{
+    } else if (!pb->eof_reached) {
         avio_seek(pb, -1, SEEK_CUR); //FIXME
     }
 



More information about the ffmpeg-cvslog mailing list