[vlc-commits] d3d11: don't store the picture_sys_d3d11_t in the picture->p_sys
Steve Lhomme
git at videolan.org
Fri Dec 13 10:13:03 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Dec 11 11:44:19 2019 +0100| [845542b8b1d12cae652ac427c45c6cca2b757aa5] | committer: Steve Lhomme
d3d11: don't store the picture_sys_d3d11_t in the picture->p_sys
It's better in the picture context.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=845542b8b1d12cae652ac427c45c6cca2b757aa5
---
modules/hw/d3d11/d3d11_deinterlace.c | 1 -
modules/hw/d3d11/d3d11_filters.c | 1 -
modules/video_chroma/d3d11_fmt.c | 5 ++---
3 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/modules/hw/d3d11/d3d11_deinterlace.c b/modules/hw/d3d11/d3d11_deinterlace.c
index e5e358e26b..2d4c5735be 100644
--- a/modules/hw/d3d11/d3d11_deinterlace.c
+++ b/modules/hw/d3d11/d3d11_deinterlace.c
@@ -250,7 +250,6 @@ picture_t *AllocPicture( filter_t *p_filter )
D3D11_AllocateResourceView(p_filter, p_sys->d3d_dev.d3ddevice, cfg, pic_ctx->picsys.texture, 0, pic_ctx->picsys.renderSrc);
- pic->p_sys = &pic_ctx->picsys;
pic_ctx->s = (picture_context_t) {
d3d11_pic_context_destroy, d3d11_pic_context_copy,
vlc_video_context_Hold(p_filter->vctx_out),
diff --git a/modules/hw/d3d11/d3d11_filters.c b/modules/hw/d3d11/d3d11_filters.c
index 892c8df165..ae79076e30 100644
--- a/modules/hw/d3d11/d3d11_filters.c
+++ b/modules/hw/d3d11/d3d11_filters.c
@@ -230,7 +230,6 @@ static picture_t *AllocPicture( filter_t *p_filter )
D3D11_AllocateResourceView(p_filter, p_sys->d3d_dev.d3ddevice, cfg, pic_ctx->picsys.texture, 0, pic_ctx->picsys.renderSrc);
- pic->p_sys = &pic_ctx->picsys;
pic_ctx->s = (picture_context_t) {
d3d11_pic_context_destroy, d3d11_pic_context_copy,
vlc_video_context_Hold(p_filter->vctx_out),
diff --git a/modules/video_chroma/d3d11_fmt.c b/modules/video_chroma/d3d11_fmt.c
index 3a3762023c..9a79a966cb 100644
--- a/modules/video_chroma/d3d11_fmt.c
+++ b/modules/video_chroma/d3d11_fmt.c
@@ -43,9 +43,8 @@
picture_sys_d3d11_t *ActiveD3D11PictureSys(picture_t *pic)
{
- if (unlikely(pic->context == NULL))
- return pic->p_sys;
-
+ assert(pic->context != NULL);
+ assert(pic->p_sys == NULL);
struct d3d11_pic_context *pic_ctx = D3D11_PICCONTEXT_FROM_PICCTX(pic->context);
return &pic_ctx->picsys;
}
More information about the vlc-commits
mailing list