[vlc-commits] d3d11: check the input video context of filters matches the D3D11 chromas
Steve Lhomme
git at videolan.org
Mon Dec 2 15:23:09 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Nov 8 09:03:01 2019 +0100| [379ce96f51c42f6508e94bc4f2056fc3a1e51c86] | committer: Steve Lhomme
d3d11: check the input video context of filters matches the D3D11 chromas
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=379ce96f51c42f6508e94bc4f2056fc3a1e51c86
---
modules/hw/d3d11/d3d11_deinterlace.c | 7 ++-----
modules/hw/d3d11/d3d11_filters.c | 2 ++
modules/hw/d3d11/d3d11_surface.c | 2 ++
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/modules/hw/d3d11/d3d11_deinterlace.c b/modules/hw/d3d11/d3d11_deinterlace.c
index 6d1c9602df..0e7d16eb50 100644
--- a/modules/hw/d3d11/d3d11_deinterlace.c
+++ b/modules/hw/d3d11/d3d11_deinterlace.c
@@ -289,15 +289,12 @@ int D3D11OpenDeinterlace(vlc_object_t *obj)
if (!is_d3d11_opaque(filter->fmt_in.video.i_chroma))
return VLC_EGENERIC;
+ if ( GetD3D11ContextPrivate(filter->vctx_in) == NULL )
+ return VLC_EGENERIC;
if (!video_format_IsSimilar(&filter->fmt_in.video, &filter->fmt_out.video))
return VLC_EGENERIC;
d3d11_video_context_t *vtcx_sys = GetD3D11ContextPrivate( filter->vctx_in );
- if (unlikely(vtcx_sys == NULL))
- {
- msg_Dbg(filter, "Filter without a context");
- return VLC_EGENERIC;
- }
filter_sys_t *sys = malloc(sizeof (*sys));
if (unlikely(sys == NULL))
diff --git a/modules/hw/d3d11/d3d11_filters.c b/modules/hw/d3d11/d3d11_filters.c
index 7857628639..4591107397 100644
--- a/modules/hw/d3d11/d3d11_filters.c
+++ b/modules/hw/d3d11/d3d11_filters.c
@@ -321,6 +321,8 @@ static int D3D11OpenAdjust(vlc_object_t *obj)
if (!is_d3d11_opaque(filter->fmt_in.video.i_chroma))
return VLC_EGENERIC;
+ if ( GetD3D11ContextPrivate(filter->vctx_in) == NULL )
+ return VLC_EGENERIC;
if (!video_format_IsSimilar(&filter->fmt_in.video, &filter->fmt_out.video))
return VLC_EGENERIC;
diff --git a/modules/hw/d3d11/d3d11_surface.c b/modules/hw/d3d11/d3d11_surface.c
index 8f132b45fc..322dd86355 100644
--- a/modules/hw/d3d11/d3d11_surface.c
+++ b/modules/hw/d3d11/d3d11_surface.c
@@ -605,6 +605,8 @@ int D3D11OpenConverter( vlc_object_t *obj )
if ( !is_d3d11_opaque(p_filter->fmt_in.video.i_chroma) )
return VLC_EGENERIC;
+ if ( GetD3D11ContextPrivate(p_filter->vctx_in) == NULL )
+ return VLC_EGENERIC;
if ( p_filter->fmt_in.video.i_visible_height != p_filter->fmt_out.video.i_visible_height
|| p_filter->fmt_in.video.i_width != p_filter->fmt_out.video.i_width )
More information about the vlc-commits
mailing list