[vlc-commits] hw:d3d11:d3d11_deinterlace: check values are ok
Steve Lhomme
git at videolan.org
Fri Nov 24 16:28:14 CET 2017
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Fri Nov 24 16:24:47 2017 +0100| [dd6b71958d0ec80575f68f701ff5c95a61cce019] | committer: Jean-Baptiste Kempf
hw:d3d11:d3d11_deinterlace: check values are ok
Also release unsused memory.
CID #1462212, #1462211
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dd6b71958d0ec80575f68f701ff5c95a61cce019
---
modules/hw/d3d11/d3d11_deinterlace.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/modules/hw/d3d11/d3d11_deinterlace.c b/modules/hw/d3d11/d3d11_deinterlace.c
index 2068ac63c1..841e413556 100644
--- a/modules/hw/d3d11/d3d11_deinterlace.c
+++ b/modules/hw/d3d11/d3d11_deinterlace.c
@@ -128,6 +128,8 @@ static int RenderPic( filter_t *p_filter, picture_t *p_outpic, picture_t *p_pic,
HRESULT hr;
filter_sys_t *p_sys = p_filter->p_sys;
+ //msg_Dbg(p_filter, "%lx deinterlace", GetCurrentThreadId());
+
picture_t *p_prev = p_sys->context.pp_history[0];
picture_t *p_cur = p_sys->context.pp_history[1];
picture_t *p_next = p_sys->context.pp_history[2];
@@ -297,6 +299,11 @@ static picture_t *NewOutputPicture( filter_t *p_filter )
break;
}
}
+ if (unlikely(cfg == NULL))
+ {
+ free(pic->p_sys);
+ return NULL;
+ }
/* create the texture that's missing */
video_format_t fmt = p_filter->fmt_out.video;
@@ -553,6 +560,7 @@ error:
ID3D11VideoDevice_Release(sys->d3dviddev);
if (sys->d3d_dev.d3dcontext)
D3D11_FilterReleaseInstance(&sys->d3d_dev);
+ free(sys);
return VLC_EGENERIC;
}
More information about the vlc-commits
mailing list