[vlc-devel] [PATCH 25/34] nvdec: check the input video context of filters matches the NVDEC chromas
Steve Lhomme
robux4 at ycbcr.xyz
Fri Nov 8 15:40:29 CET 2019
---
modules/hw/nvdec/chroma.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/hw/nvdec/chroma.c b/modules/hw/nvdec/chroma.c
index eddc91098f6..d7d3749109f 100644
--- a/modules/hw/nvdec/chroma.c
+++ b/modules/hw/nvdec/chroma.c
@@ -106,6 +106,9 @@ static int OpenCUDAToCPU( vlc_object_t *p_this )
{
filter_t *p_filter = (filter_t *)p_this;
+ if ( p_filter->vctx_in == NULL ||
+ vlc_video_context_GetType(p_filter->vctx_in) != VLC_VIDEO_CONTEXT_NVDEC )
+ return VLC_EGENERIC;
if ( !( ( p_filter->fmt_in.video.i_chroma == VLC_CODEC_NVDEC_OPAQUE &&
p_filter->fmt_out.video.i_chroma == VLC_CODEC_NV12 ) ||
( p_filter->fmt_in.video.i_chroma == VLC_CODEC_NVDEC_OPAQUE_10B &&
--
2.17.1
More information about the vlc-devel
mailing list