diff options
author | Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> | 2015-05-03 23:07:20 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-10 02:13:10 +0200 |
commit | ac7a211b3be16946acc1832d54b5e3a39dde80ce (patch) | |
tree | a1495f74a24f1316617d9063fd7a52ec5f3ba942 | |
parent | 9ac72b1dde34bd17ac6b8bdf57c82a4f609a917b (diff) | |
download | ffmpeg-ac7a211b3be16946acc1832d54b5e3a39dde80ce.tar.gz |
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@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit eb9fb508b0e09d85d234fe694333b2005e1d7a7e)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/matroskadec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 361d9de820..0d759fef91 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1416,7 +1416,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; |