[FFmpeg-cvslog] ffmpeg: fix integer overflows with sub->*display_time

Michael Niedermayer git at videolan.org
Sat Jul 12 02:28:33 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jul 12 02:11:02 2014 +0200| [59975de77741766df4cc48c66bc151a6c31f9291] | committer: Michael Niedermayer

ffmpeg: fix integer overflows with sub->*display_time

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

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

 ffmpeg.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 15f2c24..5a47510 100644
--- 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 {



More information about the ffmpeg-cvslog mailing list