[vlc-devel] [PATCH 2/2] nvdec: fix opaque output format update

quentin.chateau at deepskycorp.com quentin.chateau at deepskycorp.com
Fri Apr 3 17:29:45 CEST 2020


From: Quentin Chateau <quentin.chateau at deepskycorp.com>

The actual chroma is determined by the decoder and may
not match what we guessed before starting to decode
---
 modules/hw/nvdec/nvdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/hw/nvdec/nvdec.c b/modules/hw/nvdec/nvdec.c
index 893cd8381a..cca1cbbb04 100644
--- a/modules/hw/nvdec/nvdec.c
+++ b/modules/hw/nvdec/nvdec.c
@@ -327,7 +327,7 @@ static int CUtoFMT(video_format_t *fmt, const CUVIDEOFORMAT *p_format)
     unsigned int i_bpp = p_format->bit_depth_luma_minus8 + 8;
     vlc_fourcc_t i_chroma;
     if (is_nvdec_opaque(fmt->i_chroma))
-        i_chroma = fmt->i_chroma;
+        i_chroma = MapOpaqueChroma(p_format->chroma_format, i_bpp);
     else
         i_chroma = MapSurfaceChroma(p_format->chroma_format, i_bpp);
     if (i_chroma == 0)
-- 
2.17.1



More information about the vlc-devel mailing list