]> git.sesse.net Git - vlc/commitdiff
Corrects a Windows limitation (zooming cannot exceed container size) (patch 2/3)
authorJoseph Tulou <brezhoneg1@yahoo.fr>
Fri, 13 Feb 2009 14:00:58 +0000 (15:00 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 14 Feb 2009 16:45:49 +0000 (17:45 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
src/video_output/vout_pictures.c

index 5a44c62ced72acc4bd30815d01932fb4d589f951..48ce9412a90786be657cd99910f1501a996026d3 100644 (file)
@@ -487,9 +487,14 @@ void vout_PlacePicture( const vout_thread_t *p_vout,
             i_original_height = p_vout->fmt_in.i_visible_height *
                                 p_vout->fmt_in.i_sar_den / p_vout->fmt_in.i_sar_num;
         }
-
+#ifdef WIN32
+        /* On windows, inner video window exceeding container leads to black screen */
+        *pi_width = __MIN( i_width, i_original_width * i_zoom / ZOOM_FP_FACTOR );
+        *pi_height = __MIN( i_height, i_original_height * i_zoom / ZOOM_FP_FACTOR );
+#else
         *pi_width = i_original_width * i_zoom / ZOOM_FP_FACTOR ;
         *pi_height = i_original_height * i_zoom / ZOOM_FP_FACTOR ;
+#endif
     }
 
     int64_t i_scaled_width = p_vout->fmt_in.i_visible_width * (int64_t)p_vout->fmt_in.i_sar_num *