[FFmpeg-cvslog] avformat/thp: force moving forward
Michael Niedermayer
git at videolan.org
Sun Nov 17 20:06:24 CET 2013
ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Thu Oct 31 02:26:07 2013 +0100| [51d1e79cc18f820281aefbbb10f3e7d8e2561d2e] | 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=51d1e79cc18f820281aefbbb10f3e7d8e2561d2e
---
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