[vlc-commits] d3d11_surface: ensure the source picture is correct

Steve Lhomme git at videolan.org
Thu Jul 20 22:55:23 CEST 2017


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Thu Jul 20 11:04:55 2017 +0200| [1c7e2ab69199566ed61fb107d0819fa0324e243b] | committer: Jean-Baptiste Kempf

d3d11_surface: ensure the source picture is correct

We only treat legit opaque pictures, the ones with a context.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/video_chroma/d3d11_surface.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/video_chroma/d3d11_surface.c b/modules/video_chroma/d3d11_surface.c
index d8fe4c5993..2e9ab8d5cc 100644
--- a/modules/video_chroma/d3d11_surface.c
+++ b/modules/video_chroma/d3d11_surface.c
@@ -252,6 +252,7 @@ ok:
 static void D3D11_YUY2(filter_t *p_filter, picture_t *src, picture_t *dst)
 {
     filter_sys_t *sys = (filter_sys_t*) p_filter->p_sys;
+    assert(src->context != NULL);
     picture_sys_t *p_sys = &((struct va_pic_context*)src->context)->picsys;
 
     D3D11_TEXTURE2D_DESC desc;
@@ -389,6 +390,7 @@ static void D3D11_YUY2(filter_t *p_filter, picture_t *src, picture_t *dst)
 static void D3D11_NV12(filter_t *p_filter, picture_t *src, picture_t *dst)
 {
     filter_sys_t *sys = (filter_sys_t*) p_filter->p_sys;
+    assert(src->context != NULL);
     picture_sys_t *p_sys = &((struct va_pic_context*)src->context)->picsys;
 
     D3D11_TEXTURE2D_DESC desc;



More information about the vlc-commits mailing list