diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-31 02:26:07 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-31 02:26:07 +0100 |
commit | 6c4b87d3d6ae08a6da16b4616626b4d2a726afbf (patch) | |
tree | d9567adffbc4c168fc93b6d5425eb0023f6bbd68 | |
parent | 2b1056e4e27b046af3777e8bd65a5145abff878f (diff) | |
download | ffmpeg-6c4b87d3d6ae08a6da16b4616626b4d2a726afbf.tar.gz |
avformat/thp: force moving forward
Fixes infinite loop
Fixes Ticket3098
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. */ |