[vlc-commits] [Git][videolan/vlc][master] vout: wayland: don't keep the display width/height locally

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Tue Jul 13 12:24:20 UTC 2021



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
51cf42cd by Steve Lhomme at 2021-07-13T12:11:21+00:00
vout: wayland: don't keep the display width/height locally

It's already in vd->cfg and cannot change without a call to
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE. The value in vd->cfg during Prepare is always
the correct one.

- - - - -


1 changed file:

- modules/video_output/wayland/shm.c


Changes:

=====================================
modules/video_output/wayland/shm.c
=====================================
@@ -132,7 +132,7 @@ static void Prepare(vout_display_t *vd, picture_t *pic, subpicture_t *subpic,
 
     wl_buffer_add_listener(buf, &buffer_cbs, d);
     wl_surface_attach(surface, buf, 0, 0);
-    wl_surface_damage(surface, 0, 0, sys->display_width, sys->display_height);
+    wl_surface_damage(surface, 0, 0, vd->cfg->display.width, vd->cfg->display.height);
     wl_display_flush(display);
 
     sys->active_buffers++;
@@ -187,9 +187,6 @@ static int Control(vout_display_t *vd, int query)
         case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
         case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
         {
-            sys->display_width = vd->cfg->display.width;
-            sys->display_height = vd->cfg->display.height;
-
             if (sys->viewport != NULL)
             {
                 video_format_t fmt;
@@ -285,8 +282,6 @@ static int Open(vout_display_t *vd,
     sys->eventq = NULL;
     sys->shm = NULL;
     sys->active_buffers = 0;
-    sys->display_width = vd->cfg->display.width;
-    sys->display_height = vd->cfg->display.height;
 
     /* Get window */
     sys->embed = vd->cfg->window;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/51cf42cd5d47f92bdbca73e43be7688959a67941

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/51cf42cd5d47f92bdbca73e43be7688959a67941
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list