[vlc-devel] [PATCH v3 17/20] opengl: use the placed picture flipped from the core dimensions

Steve Lhomme robux4 at ycbcr.xyz
Wed Aug 26 13:55:44 CEST 2020


---
 modules/video_output/macosx.m         | 6 ++----
 modules/video_output/opengl/display.c | 3 +--
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index e617ce5b2e6..4b4207a1a2d 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -320,8 +320,7 @@ static void PictureDisplay (vout_display_t *vd, picture_t *pic)
     if (vlc_gl_MakeCurrent(sys->gl) == VLC_SUCCESS)
     {
         if (@available(macOS 10.14, *)) {
-            vout_display_place_t place;
-            vout_display_PlacePicture(&place, &vd->source, &sys->cfg);
+            vout_display_place_t place = *vd->place;
             vout_display_PlaceFlipVertical(&sys->cfg, &place);
             vout_display_opengl_Viewport(vd->sys->vgl, place.x, place.y,
                                          place.width, place.height);
@@ -352,8 +351,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
             {
                 /* we always use our current frame here, because we have some size constraints
                  in the ui vout provider */
-                vout_display_place_t place;
-                vout_display_PlacePicture(&place, &vd->source, vd->cfg);
+                vout_display_place_t place = *vd->place;
                 vout_display_PlaceFlipVertical(vd->cfg, &place);
                 @synchronized (sys->glView) {
                     sys->cfg = *vd->cfg;
diff --git a/modules/video_output/opengl/display.c b/modules/video_output/opengl/display.c
index 727b71c38a8..e4f6bbc125b 100644
--- a/modules/video_output/opengl/display.c
+++ b/modules/video_output/opengl/display.c
@@ -193,8 +193,7 @@ static void PictureDisplay (vout_display_t *vd, picture_t *pic)
     {
         if (sys->place_changed)
         {
-            vout_display_place_t place;
-            vout_display_PlacePicture(&place, &vd->source, vd->cfg);
+            vout_display_place_t place = *vd->place;
             vout_display_PlaceFlipVertical(vd->cfg, &place);
             float window_ar = (float)place.width / place.height;
             vout_display_opengl_SetWindowAspectRatio(sys->vgl, window_ar);
-- 
2.26.2



More information about the vlc-devel mailing list