[vlc-commits] D3D11va: fix compilation on older libavcodec

Jean-Baptiste Kempf git at videolan.org
Thu May 12 15:31:16 CEST 2016


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu May 12 15:31:03 2016 +0200| [f611782bc9d0e37f77073b4510627e1414caa22d] | committer: Jean-Baptiste Kempf

D3D11va: fix compilation on older libavcodec

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f611782bc9d0e37f77073b4510627e1414caa22d
---

 modules/codec/avcodec/d3d11va.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 1625b0e..777111e 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -115,7 +115,7 @@ struct vlc_va_sys_t
     DXGI_FORMAT                  render;
 
     ID3D11DeviceContext          *d3dctx;
-#if VLC_WINSTORE_APP && LIBAVCODEC_VERSION_CHECK(56, 36, 0, 36, 100)
+#if VLC_WINSTORE_APP && LIBAVCODEC_VERSION_CHECK(57, 2, 0, 3, 100)
     HANDLE                       context_mutex;
 #endif
 
@@ -174,7 +174,7 @@ void SetupAVCodecContext(vlc_va_t *va)
     sys->hw.cfg = &sys->cfg;
     sys->hw.surface_count = dx_sys->surface_count;
     sys->hw.surface = (ID3D11VideoDecoderOutputView**) dx_sys->hw_surface;
-#if LIBAVCODEC_VERSION_CHECK(56, 36, 0, 36, 100)
+#if LIBAVCODEC_VERSION_CHECK(57, 2, 0, 3, 100)
 #if VLC_WINSTORE_APP
     sys->hw.context_mutex = sys->context_mutex;
 #else
@@ -244,7 +244,7 @@ static int Extract(vlc_va_t *va, picture_t *output, uint8_t *data)
         assert(p_sys_out->texture != NULL);
         assert(p_sys_in->decoder == src);
 
-#if VLC_WINSTORE_APP && LIBAVCODEC_VERSION_CHECK(56, 36, 0, 36, 100)
+#if VLC_WINSTORE_APP && LIBAVCODEC_VERSION_CHECK(56, 2, 0, 3, 100)
         if( sys->context_mutex > 0 ) {
             WaitForSingleObjectEx( sys->context_mutex, INFINITE, FALSE );
         }
@@ -268,7 +268,7 @@ static int Extract(vlc_va_t *va, picture_t *output, uint8_t *data)
         ret = VLC_EGENERIC;
     }
 
-#if VLC_WINSTORE_APP && LIBAVCODEC_VERSION_CHECK(56, 36, 0, 36, 100)
+#if VLC_WINSTORE_APP && LIBAVCODEC_VERSION_CHECK(57, 2, 0, 3, 100)
     if( sys->context_mutex > 0 ) {
         ReleaseMutex( sys->context_mutex );
     }
@@ -368,7 +368,7 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
            msg_Err(va, "Could not Query ID3D11VideoDevice Interface from the picture. (hr=0x%lX)", hr);
         } else {
             ID3D11DeviceContext_GetDevice( p_sys->context, (ID3D11Device**) &dx_sys->d3ddev );
-#if VLC_WINSTORE_APP && LIBAVCODEC_VERSION_CHECK(56, 36, 0, 36, 100)
+#if VLC_WINSTORE_APP && LIBAVCODEC_VERSION_CHECK(57, 2, 0, 3, 100)
             HANDLE context_lock = INVALID_HANDLE_VALUE;
             UINT dataSize = sizeof(context_lock);
             hr = ID3D11Device_GetPrivateData((ID3D11Device*)dx_sys->d3ddev, &GUID_CONTEXT_MUTEX, &dataSize, &context_lock);



More information about the vlc-commits mailing list