From 6c4b87d3d6ae08a6da16b4616626b4d2a726afbf Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 31 Oct 2013 02:26:07 +0100 Subject: avformat/thp: force moving forward Fixes infinite loop Fixes Ticket3098 Signed-off-by: Michael Niedermayer --- 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. */ -- cgit v1.1