[vlc-commits] d3d9: check CopyInitCache return value
Thomas Guillem
git at videolan.org
Mon Mar 19 12:15:39 CET 2018
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Mar 14 16:02:45 2018 +0100| [041b672bdf72bd1237114748649b27ec115a3dc4] | committer: Thomas Guillem
d3d9: check CopyInitCache return value
(cherry picked from commit 6275ef832a49d0dcb109b68ebd77160dc7c1e08a)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=041b672bdf72bd1237114748649b27ec115a3dc4
---
modules/hw/d3d9/dxa9.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/modules/hw/d3d9/dxa9.c b/modules/hw/d3d9/dxa9.c
index f0e97020e1..bfd0bb48ed 100644
--- a/modules/hw/d3d9/dxa9.c
+++ b/modules/hw/d3d9/dxa9.c
@@ -327,13 +327,19 @@ int D3D9OpenConverter( vlc_object_t *obj )
if (!p_sys)
return VLC_ENOMEM;
+ if (CopyInitCache(&p_sys->cache, p_filter->fmt_in.video.i_width ))
+ {
+ free(p_sys);
+ return VLC_ENOMEM;
+ }
+
if (unlikely(D3D9_Create( p_filter, &p_sys->hd3d ) != VLC_SUCCESS)) {
msg_Warn(p_filter, "cannot load d3d9.dll, aborting");
+ CopyCleanCache(&p_sys->cache);
free(p_sys);
return VLC_EGENERIC;
}
- CopyInitCache(&p_sys->cache, p_filter->fmt_in.video.i_width );
p_filter->p_sys = p_sys;
return VLC_SUCCESS;
}
More information about the vlc-commits
mailing list