[FFmpeg-cvslog] avformat/thp: force moving forward

Michael Niedermayer git at videolan.org
Thu Oct 31 02:33:47 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Oct 31 02:26:07 2013 +0100| [6c4b87d3d6ae08a6da16b4616626b4d2a726afbf] | committer: Michael Niedermayer

avformat/thp: force moving forward

Fixes infinite loop
Fixes Ticket3098

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

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

 libavformat/thp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/thp.c b/libavformat/thp.c
index 09979ac..568807d 100644
--- a/libavformat/thp.c
+++ b/libavformat/thp.c
@@ -158,7 +158,7 @@ static int thp_read_packet(AVFormatContext *s,
         avio_seek(pb, thp->next_frame, SEEK_SET);
 
         /* Locate the next frame and read out its size.  */
-        thp->next_frame += thp->next_framesz;
+        thp->next_frame += FFMAX(thp->next_framesz, 1);
         thp->next_framesz = avio_rb32(pb);
 
                         avio_rb32(pb); /* Previous total size.  */



More information about the ffmpeg-cvslog mailing list