[FFmpeg-cvslog] avformat/thp: force moving forward
Michael Niedermayer
git at videolan.org
Tue Dec 24 04:00:55 CET 2013
ffmpeg | branch: release/2.0 | Michael Niedermayer <michaelni at gmx.at> | Thu Oct 31 02:26:07 2013 +0100| [4324d7badeb6ccbd6bd3bd65967b7e56c8915b30] | committer: Michael Niedermayer
avformat/thp: force moving forward
Fixes infinite loop
Fixes Ticket3098
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 6c4b87d3d6ae08a6da16b4616626b4d2a726afbf)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4324d7badeb6ccbd6bd3bd65967b7e56c8915b30
---
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. */
More information about the ffmpeg-cvslog
mailing list