[vlc-commits] d3d9_filters: fix a potential crash
Steve Lhomme
git at videolan.org
Mon Feb 5 19:21:20 CET 2018
vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Feb 5 18:44:30 2018 +0100| [f9e6eda55af6e292e77e724e4f5282101194d0d5] | committer: Jean-Baptiste Kempf
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.
(cherry picked from commit 480e9c862606f45095d45f2869e890c0251a11ea)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=f9e6eda55af6e292e77e724e4f5282101194d0d5
---
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 90d85fcb88..0dc1488a3d 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