aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-31 02:26:07 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-17 19:11:07 +0100
commit51d1e79cc18f820281aefbbb10f3e7d8e2561d2e (patch)
tree09d18b5a57116b7bc59a552ee17df2454b59862a /libavformat
parent807d85400c735127d0195329638d54a5d65b2b44 (diff)
downloadffmpeg-51d1e79cc18f820281aefbbb10f3e7d8e2561d2e.tar.gz
avformat/thp: force moving forward
Fixes infinite loop Fixes Ticket3098 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 6c4b87d3d6ae08a6da16b4616626b4d2a726afbf) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-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. */