[vlc-devel] commit: Corrects a Windows limitation (zooming cannot exceed container size ) (patch 2/3) (Joseph Tulou )
git version control
git at videolan.org
Sat Feb 14 17:48:19 CET 2009
vlc | branch: master | Joseph Tulou <brezhoneg1 at yahoo.fr> | Fri Feb 13 15:00:58 2009 +0100| [6d17b907cb3a4f86283a43165e2a842234531636] | committer: Jean-Baptiste Kempf
Corrects a Windows limitation (zooming cannot exceed container size) (patch 2/3)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6d17b907cb3a4f86283a43165e2a842234531636
---
src/video_output/vout_pictures.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/video_output/vout_pictures.c b/src/video_output/vout_pictures.c
index 5a44c62..48ce941 100644
--- a/src/video_output/vout_pictures.c
+++ b/src/video_output/vout_pictures.c
@@ -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 *
More information about the vlc-devel
mailing list