From e3d4784eb31b3ea4a97f2d4c698a75fab9bf3d86 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Wed, 16 Sep 2015 13:27:42 +0200 Subject: d3d11va: WindowsPhone requires a mutex around ID3D11VideoContext --- libavcodec/d3d11va.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'libavcodec/d3d11va.h') diff --git a/libavcodec/d3d11va.h b/libavcodec/d3d11va.h index f5777c26dd..9264ec6ed4 100644 --- a/libavcodec/d3d11va.h +++ b/libavcodec/d3d11va.h @@ -53,8 +53,10 @@ * to the Direct3D11 Libav HWAccel implementation. * * The application must make it available as AVCodecContext.hwaccel_context. + * + * Use av_d3d11va_alloc_context() exclusively to allocate an AVD3D11VAContext. */ -struct AVD3D11VAContext { +typedef struct AVD3D11VAContext { /** * D3D11 decoder object */ @@ -89,7 +91,19 @@ struct AVD3D11VAContext { * Private to the Libav AVHWAccel implementation */ unsigned report_id; -}; + + /** + * Mutex to access video_context + */ + HANDLE context_mutex; +} AVD3D11VAContext; + +/** + * Allocate an AVD3D11VAContext. + * + * @return Newly-allocated AVD3D11VAContext or NULL on failure. + */ +AVD3D11VAContext *av_d3d11va_alloc_context(void); /** * @} -- cgit v1.2.3