summaryrefslogtreecommitdiff
path: root/libavformat/thp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-31 02:26:07 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-10-31 02:26:07 +0100
commit6c4b87d3d6ae08a6da16b4616626b4d2a726afbf (patch)
treed9567adffbc4c168fc93b6d5425eb0023f6bbd68 /libavformat/thp.c
parent2b1056e4e27b046af3777e8bd65a5145abff878f (diff)
avformat/thp: force moving forward
Fixes infinite loop Fixes Ticket3098 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/thp.c')
-rw-r--r--libavformat/thp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/thp.c b/libavformat/thp.c
index 09979aca99..568807d6f7 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. */