[vlc-commits] nvdec: check the input video context of filters matches the NVDEC chromas
Steve Lhomme
git at videolan.org
Mon Dec 2 15:33:50 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Nov 8 09:01:37 2019 +0100| [d8bbe6b709c998fff40706d47e072ae6c9cfe496] | committer: Steve Lhomme
nvdec: check the input video context of filters matches the NVDEC chromas
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d8bbe6b709c998fff40706d47e072ae6c9cfe496
---
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 422afae31e..ad52e4361d 100644
--- a/modules/hw/nvdec/chroma.c
+++ b/modules/hw/nvdec/chroma.c
@@ -104,6 +104,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 &&
More information about the vlc-commits
mailing list