Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
6ffd4608 by Alexandre Janniaux at 2022-04-15T15:05:59+00:00
libplacebo: display: fix variable type

pl-output-hint is an integer variable, and it was leading to warnings
when compiling:

    ../../modules/video_output/libplacebo/display.c: In function 
'UpdateColorspaceHint':
    ../../modules/video_output/libplacebo/display.c:499:5: warning: case label 
value exceeds maximum value for type [-Wswitch-outside-range]
      499 |     case OUTPUT_HDR10:
          |     ^~~~
    ../../modules/video_output/libplacebo/display.c:503:5: warning: case label 
value exceeds maximum value for type [-Wswitch-outside-range]
      503 |     case OUTPUT_HLG:
          |     ^~~~
    ../../modules/video_output/libplacebo/display.c:477:5: warning: switch 
condition has boolean value [-Wswitch-bool]
      477 |     switch (var_InheritBool(vd, "pl-output-hint")) {
          |     ^~~~~~

- - - - -


1 changed file:

- modules/video_output/libplacebo/display.c


Changes:

=====================================
modules/video_output/libplacebo/display.c
=====================================
@@ -474,7 +474,7 @@ static void UpdateColorspaceHint(vout_display_t *vd, const 
video_format_t *fmt)
     vout_display_sys_t *sys = vd->sys;
     struct pl_swapchain_colors hint = {0};
 
-    switch (var_InheritBool(vd, "pl-output-hint")) {
+    switch (var_InheritInteger(vd, "pl-output-hint")) {
     case OUTPUT_AUTO: ;
         const struct pl_color_space csp = vlc_placebo_ColorSpace(fmt);
         hint.primaries = csp.primaries;



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/6ffd46080349d3725030101ec0a0da24d4f61b4c

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


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to