[vlc-commits] commit: Fix snapshot height integer overflow creating mini-snapshots ( Jean-Baptiste Kempf )

git at videolan.org git at videolan.org
Mon Aug 16 15:45:27 CEST 2010


vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Aug 16 15:40:52 2010 +0200| [0382ac451696a25f6ba84d4a0e925e927d192666] | committer: Jean-Baptiste Kempf 

Fix snapshot height integer overflow creating mini-snapshots

See http://forum.videolan.org/viewtopic.php?f=2&t=81103
http://forum.videolan.org/viewtopic.php?f=14&t=80008
http://forum.videolan.org/viewtopic.php?f=13&t=73500
(cherry picked from commit 2aef1c084bef4e127c7c15f6c75707b3b68fa4f4)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=0382ac451696a25f6ba84d4a0e925e927d192666
---

 src/video_output/vout_pictures.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/video_output/vout_pictures.c b/src/video_output/vout_pictures.c
index 9327a4b..09d0e3b 100644
--- a/src/video_output/vout_pictures.c
+++ b/src/video_output/vout_pictures.c
@@ -907,13 +907,13 @@ int picture_Export( vlc_object_t *p_obj,
     unsigned int i_original_height;
     if( fmt_in.i_sar_num >= fmt_in.i_sar_den )
     {
-        i_original_width = fmt_in.i_width * fmt_in.i_sar_num / fmt_in.i_sar_den;
+        i_original_width = (int64_t)fmt_in.i_width * fmt_in.i_sar_num / fmt_in.i_sar_den;
         i_original_height = fmt_in.i_height;
     }
     else
     {
         i_original_width =  fmt_in.i_width;
-        i_original_height = fmt_in.i_height * fmt_in.i_sar_den / fmt_in.i_sar_num;
+        i_original_height = (int64_t)fmt_in.i_height * fmt_in.i_sar_den / fmt_in.i_sar_num;
     }
 
     /* */



More information about the vlc-commits mailing list