[FFmpeg-cvslog] matroskadec: use uint64_t instead of int for index_scale

Andreas Cadhalpun git at videolan.org
Wed Jun 17 22:09:50 CEST 2015


ffmpeg | branch: release/2.2 | Andreas Cadhalpun <andreas.cadhalpun at googlemail.com> | Sun May  3 23:07:20 2015 +0200| [1f5eeed43ba42698f054635837283f8ea1bf0137] | committer: Michael Niedermayer

matroskadec: use uint64_t instead of int for index_scale

index_scale is set to matroska->time_scale of type uint64_t.

When index_scale is int, the assignment can overflow and e.g. result
in index_scale = 0. This causes a floating point exception due to the
division by index_scale.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit eb9fb508b0e09d85d234fe694333b2005e1d7a7e)

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

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

 libavformat/matroskadec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 4c06c99..bf07738 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1455,7 +1455,7 @@ static void matroska_execute_seekhead(MatroskaDemuxContext *matroska)
 static void matroska_add_index_entries(MatroskaDemuxContext *matroska) {
     EbmlList *index_list;
     MatroskaIndex *index;
-    int index_scale = 1;
+    uint64_t index_scale = 1;
     int i, j;
 
     index_list = &matroska->index;



More information about the ffmpeg-cvslog mailing list