[vlc-commits] d3d9_filters: fix a potential crash

Steve Lhomme git at videolan.org
Mon Feb 5 18:47:17 CET 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Feb  5 18:44:30 2018 +0100| [480e9c862606f45095d45f2869e890c0251a11ea] | committer: Steve Lhomme

d3d9_filters: fix a potential crash

This can happen if more than one filter is used. There is not enough in this cases the
picture is created in CPU, not from the GPU pool and it fails.

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

 modules/hw/d3d9/d3d9_filters.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/hw/d3d9/d3d9_filters.c b/modules/hw/d3d9/d3d9_filters.c
index 82a921d2fa..7f565c2de4 100644
--- a/modules/hw/d3d9/d3d9_filters.c
+++ b/modules/hw/d3d9/d3d9_filters.c
@@ -107,7 +107,7 @@ static picture_t *Filter(filter_t *p_filter, picture_t *p_pic)
     picture_sys_t *p_src_sys = ActivePictureSys(p_pic);
 
     picture_t *p_outpic = filter_NewPicture( p_filter );
-    if( !p_outpic )
+    if( !p_outpic || !p_outpic->p_sys->surface )
         goto failed;
 
     picture_CopyProperties( p_outpic, p_pic );



More information about the vlc-commits mailing list