[vlc-devel] [PATCH 31/39] directx_va: remove the unused lock

Steve Lhomme robux4 at videolabs.io
Fri Jun 2 16:46:34 CEST 2017


---
 modules/codec/avcodec/directx_va.c | 5 -----
 modules/codec/avcodec/directx_va.h | 2 --
 2 files changed, 7 deletions(-)

diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c
index 9996470ccb..cacc45fc6c 100644
--- a/modules/codec/avcodec/directx_va.c
+++ b/modules/codec/avcodec/directx_va.c
@@ -350,7 +350,6 @@ int directx_va_Setup(vlc_va_t *va, directx_sys_t *dx_sys, AVCodecContext *avctx)
             return VLC_ENOMEM;
         }
         atomic_init(&surface->refcount, 1);
-        surface->p_lock = &dx_sys->surface_lock;
         surface->p_pic = dx_sys->pf_alloc_surface_pic(va, &fmt, i);
         dx_sys->surface[i] = surface;
     }
@@ -442,8 +441,6 @@ void directx_va_Close(vlc_va_t *va, directx_sys_t *dx_sys)
 
     if (dx_sys->hdecoder_dll)
         FreeLibrary(dx_sys->hdecoder_dll);
-
-    vlc_mutex_destroy( &dx_sys->surface_lock );
 }
 
 int directx_va_Open(vlc_va_t *va, directx_sys_t *dx_sys,
@@ -451,8 +448,6 @@ int directx_va_Open(vlc_va_t *va, directx_sys_t *dx_sys,
 {
     dx_sys->codec_id = ctx->codec_id;
 
-    vlc_mutex_init( &dx_sys->surface_lock );
-
     if (b_dll) {
         /* Load dll*/
         dx_sys->hdecoder_dll = LoadLibrary(dx_sys->psz_decoder_dll);
diff --git a/modules/codec/avcodec/directx_va.h b/modules/codec/avcodec/directx_va.h
index b5512b25c7..4a85e78b76 100644
--- a/modules/codec/avcodec/directx_va.h
+++ b/modules/codec/avcodec/directx_va.h
@@ -45,7 +45,6 @@
 /* */
 typedef struct {
     atomic_uintptr_t     refcount;
-    vlc_mutex_t        *p_lock;
     picture_t          *p_pic;
     AVVA_DecoderSurface  *decoderSurface;
 } vlc_va_surface_t;
@@ -82,7 +81,6 @@ typedef struct
     int          surface_width;
     int          surface_height;
 
-    vlc_mutex_t      surface_lock;
     vlc_va_surface_t     *surface[MAX_SURFACE_COUNT];
     AVVA_DecoderSurface  *hw_surface[MAX_SURFACE_COUNT];
 
-- 
2.12.1



More information about the vlc-devel mailing list