From a3d8e30b56561a23fceb400f2b22b00aa7ca8560 Mon Sep 17 00:00:00 2001 From: Zhao Zhili Date: Thu, 12 Jul 2018 11:36:41 +0800 Subject: [PATCH] d3d9_fmt and d3d11_fmt: inline ActivePictureSys() Fix static build. Signed-off-by: Steve Lhomme --- modules/video_chroma/d3d11_fmt.c | 6 ------ modules/video_chroma/d3d11_fmt.h | 6 +++++- modules/video_chroma/d3d9_fmt.c | 6 ------ modules/video_chroma/d3d9_fmt.h | 6 +++++- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/modules/video_chroma/d3d11_fmt.c b/modules/video_chroma/d3d11_fmt.c index a8543b0f57..0057387f86 100644 --- a/modules/video_chroma/d3d11_fmt.c +++ b/modules/video_chroma/d3d11_fmt.c @@ -39,12 +39,6 @@ #include "../codec/avcodec/va_surface.h" -picture_sys_t *ActivePictureSys(picture_t *p_pic) -{ - struct va_pic_context *pic_ctx = (struct va_pic_context*)p_pic->context; - return pic_ctx ? &pic_ctx->picsys : p_pic->p_sys; -} - void AcquirePictureSys(picture_sys_t *p_sys) { for (int i=0; icontext; + return pic_ctx ? &pic_ctx->picsys : p_pic->p_sys; +} /* index to use for texture/resource that use a known DXGI format * (ie not DXGI_FORMAT_UNKNWON) */ diff --git a/modules/video_chroma/d3d9_fmt.c b/modules/video_chroma/d3d9_fmt.c index 6b67f0c2ac..f42a1c8dc0 100644 --- a/modules/video_chroma/d3d9_fmt.c +++ b/modules/video_chroma/d3d9_fmt.c @@ -29,12 +29,6 @@ #include "../codec/avcodec/va_surface.h" -picture_sys_t *ActivePictureSys(picture_t *p_pic) -{ - struct va_pic_context *pic_ctx = (struct va_pic_context*)p_pic->context; - return pic_ctx ? &pic_ctx->picsys : p_pic->p_sys; -} - #undef D3D9_CreateDevice HRESULT D3D9_CreateDevice(vlc_object_t *o, d3d9_handle_t *hd3d, HWND hwnd, const video_format_t *source, d3d9_device_t *out) diff --git a/modules/video_chroma/d3d9_fmt.h b/modules/video_chroma/d3d9_fmt.h index 9db5659abf..1e065f83c3 100644 --- a/modules/video_chroma/d3d9_fmt.h +++ b/modules/video_chroma/d3d9_fmt.h @@ -69,7 +69,11 @@ typedef struct #include "../codec/avcodec/va_surface.h" -picture_sys_t *ActivePictureSys(picture_t *p_pic); +static inline picture_sys_t *ActivePictureSys(picture_t *p_pic) +{ + struct va_pic_context *pic_ctx = (struct va_pic_context*)p_pic->context; + return pic_ctx ? &pic_ctx->picsys : p_pic->p_sys; +} static inline void AcquirePictureSys(picture_sys_t *p_sys) { -- 2.11.4.GIT