Commit 041b672b authored by Thomas Guillem's avatar Thomas Guillem

d3d9: check CopyInitCache return value

(cherry picked from commit 6275ef83)
Signed-off-by: Thomas Guillem's avatarThomas Guillem <thomas@gllm.fr>
parent 6ced285b
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment