[FFmpeg-cvslog] lavf: fix integer overflow in rfps calculation

Michael Niedermayer git at videolan.org
Thu Nov 1 22:02:43 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Nov  1 21:16:32 2012 +0100| [f742c7b2cef7975cb46e7da8c3aff85a085b5193] | committer: Michael Niedermayer

lavf: fix integer overflow in rfps calculation

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

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

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

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 3171b21..72a3d5e 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2721,7 +2721,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
                     int framerate= get_std_framerate(i);
                     double sdts= dts*framerate/(1001*12);
                     for(j=0; j<2; j++){
-                        int ticks= lrintf(sdts+j*0.5);
+                        int64_t ticks= llrint(sdts+j*0.5);
                         double error= sdts - ticks + j*0.5;
                         st->info->duration_error[j][0][i] += error;
                         st->info->duration_error[j][1][i] += error*error;



More information about the ffmpeg-cvslog mailing list