[vlc-commits] vaapi: check the input video context of filters matches the VAAPI chromas

Steve Lhomme git at videolan.org
Mon Dec 2 15:23:13 CET 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Nov  8 13:42:40 2019 +0100| [3949ed82824ea186c389dc0c4d173fe942d088c5] | committer: Steve Lhomme

vaapi: check the input video context of filters matches the VAAPI chromas

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3949ed82824ea186c389dc0c4d173fe942d088c5
---

 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 907e588701..1103c597bd 100644
--- a/modules/hw/vaapi/filters.c
+++ b/modules/hw/vaapi/filters.c
@@ -297,6 +297,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;



More information about the vlc-commits mailing list