diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-31 02:26:07 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-16 00:35:12 +0100 |
commit | 971b13752d921b76d59f0bfea0afb27b0ea3124e (patch) | |
tree | 57f4f7aff377eec4a5d793a500954f40a0dbdfc6 | |
parent | d0ed672484e46f0b79e2ac91dfd6dab49a8f1017 (diff) | |
download | ffmpeg-971b13752d921b76d59f0bfea0afb27b0ea3124e.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>
-rw-r--r-- | libavformat/thp.c | 2 |
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. */ |