[vlc-devel] [PATCH 29/34] vaapi: check the input video context of filters matches the VAAPI chromas

Steve Lhomme robux4 at ycbcr.xyz
Fri Nov 8 15:40:33 CET 2019


---
 modules/hw/vaapi/filters.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/hw/vaapi/filters.c b/modules/hw/vaapi/filters.c
index ee81a114340..c711c962dd0 100644
--- a/modules/hw/vaapi/filters.c
+++ b/modules/hw/vaapi/filters.c
@@ -361,6 +361,8 @@ Open(filter_t * filter,
 {
     filter_sys_t *      filter_sys;
 
+    if (filter->vctx_in == NULL ||
+        vlc_video_context_GetType(filter->vctx_in) != VLC_VIDEO_CONTEXT_VAAPI)
     if (!vlc_vaapi_IsChromaOpaque(filter->fmt_out.video.i_chroma) ||
         !video_format_IsSimilar(&filter->fmt_out.video, &filter->fmt_in.video))
         return VLC_EGENERIC;
-- 
2.17.1



More information about the vlc-devel mailing list