[FFmpeg-cvslog] avformat/thp: fix variable types to avoid overflows

Michael Niedermayer git at videolan.org
Thu Jan 16 02:46:54 CET 2014


ffmpeg | branch: release/1.2 | Michael Niedermayer <michaelni at gmx.at> | Thu Oct 31 02:19:40 2013 +0100| [d0ed672484e46f0b79e2ac91dfd6dab49a8f1017] | committer: Michael Niedermayer

avformat/thp: fix variable types to avoid overflows

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 2b1056e4e27b046af3777e8bd65a5145abff878f)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d0ed672484e46f0b79e2ac91dfd6dab49a8f1017
---

 libavformat/thp.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/libavformat/thp.c b/libavformat/thp.c
index 3717b8f..09979ac 100644
--- a/libavformat/thp.c
+++ b/libavformat/thp.c
@@ -26,15 +26,15 @@
 
 typedef struct ThpDemuxContext {
     int              version;
-    int              first_frame;
-    int              first_framesz;
-    int              last_frame;
+    unsigned         first_frame;
+    unsigned         first_framesz;
+    unsigned         last_frame;
     int              compoff;
-    int              framecnt;
+    unsigned         framecnt;
     AVRational       fps;
-    int              frame;
-    int              next_frame;
-    int              next_framesz;
+    unsigned         frame;
+    int64_t          next_frame;
+    unsigned         next_framesz;
     int              video_stream_index;
     int              audio_stream_index;
     int              compcount;



More information about the ffmpeg-cvslog mailing list