[vlc-commits] [Git][videolan/vlc][master] vout_subpictures: only get the alignment once

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Feb 27 12:18:29 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
3108886a by Steve Lhomme at 2025-02-27T12:06:26+00:00
vout_subpictures: only get the alignment once

No need for a ternary operator.

- - - - -


1 changed file:

- src/video_output/vout_subpictures.c


Changes:

=====================================
src/video_output/vout_subpictures.c
=====================================
@@ -1001,9 +1001,11 @@ static struct subpicture_region_rendered *SpuRenderRegion(spu_t *spu,
     /* Place the picture
      * We compute the position in the rendered size */
 
-    int i_align = region->i_align;
-    if (channel_order == VLC_VOUT_ORDER_SECONDARY)
-        i_align = sys->secondary_alignment >= 0 ? sys->secondary_alignment : i_align;
+    int i_align;
+    if (channel_order == VLC_VOUT_ORDER_SECONDARY && sys->secondary_alignment >= 0)
+        i_align = sys->secondary_alignment;
+    else
+        i_align = region->i_align;
 
     SpuRegionPlace(&x_offset, &y_offset,
                    subpic, region, i_align);



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3108886a6f71607f039a818e2da51db242b67cfa

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


VideoLAN code repository instance


More information about the vlc-commits mailing list