[vlc-devel] [PATCH 07/15] kms: check the chroma of the source video format in Open

Steve Lhomme robux4 at ycbcr.xyz
Thu Sep 3 07:52:24 CEST 2020


No need to depend on the output format.
---
 modules/video_output/kms.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/kms.c b/modules/video_output/kms.c
index f0b5d32ebcc..6de37d33727 100644
--- a/modules/video_output/kms.c
+++ b/modules/video_output/kms.c
@@ -692,14 +692,14 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
             sys->vlc_fourcc = local_vlc_chroma;
             msg_Dbg(vd, "Forcing VLC to use chroma '%4s'", chroma);
          } else {
-            sys->vlc_fourcc = fmtp->i_chroma;
+            sys->vlc_fourcc = vd->source->i_chroma;
             msg_Dbg(vd, "Chroma %4s invalid, using default", chroma);
          }
 
         free(chroma);
         chroma = NULL;
     } else {
-        sys->vlc_fourcc = fmtp->i_chroma;
+        sys->vlc_fourcc = vd->source->i_chroma;
         msg_Dbg(vd, "Chroma not defined, using default");
     }
 
-- 
2.26.2



More information about the vlc-devel mailing list