Commit eb9fb508 authored by Andreas Cadhalpun's avatar Andreas Cadhalpun Committed by 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: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 800df6a8
......@@ -1504,7 +1504,7 @@ 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;
if (matroska->ctx->flags & AVFMT_FLAG_IGNIDX)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment