ffmpeg: fix integer overflows with sub->*display_time
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 12 Jul 2014 00:11:02 +0000 (02:11 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 12 Jul 2014 00:23:48 +0000 (02:23 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg.c

index 15f2c24..5a47510 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -232,9 +232,9 @@ static void sub2video_update(InputStream *ist, AVSubtitle *sub)
     if (!frame)
         return;
     if (sub) {
-        pts       = av_rescale_q(sub->pts + sub->start_display_time * 1000,
+        pts       = av_rescale_q(sub->pts + sub->start_display_time * 1000LL,
                                  AV_TIME_BASE_Q, ist->st->time_base);
-        end_pts   = av_rescale_q(sub->pts + sub->end_display_time   * 1000,
+        end_pts   = av_rescale_q(sub->pts + sub->end_display_time   * 1000LL,
                                  AV_TIME_BASE_Q, ist->st->time_base);
         num_rects = sub->num_rects;
     } else {