[vlc-commits] [Git][videolan/vlc][master] libplacebo: display: use array for planes
    Rémi Denis-Courmont (@Courmisch) 
    gitlab at videolan.org
       
    Sun Nov 28 21:48:14 UTC 2021
    
    
  
Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC
Commits:
478e4dac by Alexandre Janniaux at 2021-11-28T21:05:23+00:00
libplacebo: display: use array for planes
vlc_placebo_PlaneData is expecting an array of four elements. Not
complying to this results in the following warning, even if the code is
not making use of the other planes.
../../modules/video_output/libplacebo/display.c:369:18: warning: ‘vlc_placebo_PlaneData’ accessing 480 bytes in a region of size 120 [-Wstringop-overflow=]
  369 |             if (!vlc_placebo_PlaneData(r->p_picture, &subdata, NULL))
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- - - - -
1 changed file:
- modules/video_output/libplacebo/display.c
Changes:
=====================================
modules/video_output/libplacebo/display.c
=====================================
@@ -365,8 +365,8 @@ static void PictureRender(vout_display_t *vd, picture_t *pic,
         subpicture_region_t *r = subpicture->p_region;
         for (int i = 0; i < num_regions; i++) {
             assert(r->p_picture->i_planes == 1);
-            struct pl_plane_data subdata;
-            if (!vlc_placebo_PlaneData(r->p_picture, &subdata, NULL))
+            struct pl_plane_data subdata[4];
+            if (!vlc_placebo_PlaneData(r->p_picture, subdata, NULL))
                 assert(!"Failed processing the subpicture_t into pl_plane_data!?");
 
             struct pl_overlay *overlay = &sys->overlays[i];
@@ -383,7 +383,7 @@ static void PictureRender(vout_display_t *vd, picture_t *pic,
                 .repr  = vlc_placebo_ColorRepr(&r->fmt),
             };
 
-            if (!pl_upload_plane(gpu, &overlay->plane, &sys->overlay_tex[i], &subdata)) {
+            if (!pl_upload_plane(gpu, &overlay->plane, &sys->overlay_tex[i], subdata)) {
                 msg_Err(vd, "Failed uploading subpicture region!");
                 num_regions = i; // stop here
                 break;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/478e4dac8f9dc4d7db89d8e9f0b08f61d95e60a4
-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/478e4dac8f9dc4d7db89d8e9f0b08f61d95e60a4
You're receiving this email because of your account on code.videolan.org.
    
    
More information about the vlc-commits
mailing list