[vlc-commits] d3d9: don't store the picture_sys_d3d9_t in the picture->p_sys
Steve Lhomme
git at videolan.org
Fri Dec 13 10:13:01 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Dec 11 11:36:54 2019 +0100| [55af432d04bac39a88704b85eddecc99b5453821] | committer: Steve Lhomme
d3d9: don't store the picture_sys_d3d9_t in the picture->p_sys
It's better in the picture context.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=55af432d04bac39a88704b85eddecc99b5453821
---
modules/hw/d3d9/d3d9_filters.c | 1 -
modules/hw/d3d9/dxa9.c | 1 -
modules/hw/d3d9/dxva2_deinterlace.c | 1 -
modules/video_chroma/d3d9_fmt.c | 5 ++---
4 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/modules/hw/d3d9/d3d9_filters.c b/modules/hw/d3d9/d3d9_filters.c
index 9db93e0e44..abd82c9af2 100644
--- a/modules/hw/d3d9/d3d9_filters.c
+++ b/modules/hw/d3d9/d3d9_filters.c
@@ -127,7 +127,6 @@ static picture_t *AllocPicture( filter_t *p_filter )
picture_Release(pic);
return NULL;
}
- pic->p_sys = &pic_ctx->picsys;
AcquireD3D9PictureSys( &pic_ctx->picsys );
IDirect3DSurface9_Release(pic_ctx->picsys.surface);
pic_ctx->s = (picture_context_t) {
diff --git a/modules/hw/d3d9/dxa9.c b/modules/hw/d3d9/dxa9.c
index 40c4909409..a654ffd1f1 100644
--- a/modules/hw/d3d9/dxa9.c
+++ b/modules/hw/d3d9/dxa9.c
@@ -354,7 +354,6 @@ static picture_t *AllocateCPUtoGPUTexture(filter_t *p_filter)
}
picture_Setup(p_dst, &p_dst->format);
pic_ctx->picsys.surface = texture;
- p_dst->p_sys = &pic_ctx->picsys;
p_dst->context = &pic_ctx->s;
return p_dst;
diff --git a/modules/hw/d3d9/dxva2_deinterlace.c b/modules/hw/d3d9/dxva2_deinterlace.c
index 3a506933be..7c0c4ec692 100644
--- a/modules/hw/d3d9/dxva2_deinterlace.c
+++ b/modules/hw/d3d9/dxva2_deinterlace.c
@@ -311,7 +311,6 @@ picture_t *AllocPicture( filter_t *p_filter )
picture_Release(pic);
return NULL;
}
- pic->p_sys = &pic_ctx->picsys;
AcquireD3D9PictureSys( &pic_ctx->picsys );
IDirect3DSurface9_Release(pic_ctx->picsys.surface);
pic_ctx->s = (picture_context_t) {
diff --git a/modules/video_chroma/d3d9_fmt.c b/modules/video_chroma/d3d9_fmt.c
index 7bc71d1324..36a4635f6e 100644
--- a/modules/video_chroma/d3d9_fmt.c
+++ b/modules/video_chroma/d3d9_fmt.c
@@ -33,9 +33,8 @@
picture_sys_d3d9_t *ActiveD3D9PictureSys(picture_t *pic)
{
- if (unlikely(pic->context == NULL))
- return pic->p_sys;
-
+ assert(pic->context != NULL);
+ assert(pic->p_sys == NULL);
struct d3d9_pic_context *pic_ctx = D3D9_PICCONTEXT_FROM_PICCTX(pic->context);
return &pic_ctx->picsys;
}
More information about the vlc-commits
mailing list