[vlc-devel] [PATCH 22/39] directx_va: no need to store temporarily the number of threads

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


---
 modules/codec/avcodec/directx_va.c | 4 +---
 modules/codec/avcodec/directx_va.h | 2 --
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c
index 7b99ab3c41..539853ed12 100644
--- a/modules/codec/avcodec/directx_va.c
+++ b/modules/codec/avcodec/directx_va.c
@@ -315,7 +315,7 @@ int directx_va_Setup(vlc_va_t *va, directx_sys_t *dx_sys, AVCodecContext *avctx)
     }
 
     if ( avctx->active_thread_type & FF_THREAD_FRAME )
-        surface_count += dx_sys->thread_count;
+        surface_count += avctx->thread_count;
 
     if (surface_count > MAX_SURFACE_COUNT)
         return VLC_EGENERIC;
@@ -487,8 +487,6 @@ int directx_va_Open(vlc_va_t *va, directx_sys_t *dx_sys,
         goto error;
     }
 
-    dx_sys->thread_count = ctx->thread_count;
-
     return VLC_SUCCESS;
 
 error:
diff --git a/modules/codec/avcodec/directx_va.h b/modules/codec/avcodec/directx_va.h
index 42fd6dbce0..7bdec0052d 100644
--- a/modules/codec/avcodec/directx_va.h
+++ b/modules/codec/avcodec/directx_va.h
@@ -82,8 +82,6 @@ typedef struct
     int          surface_width;
     int          surface_height;
 
-    int          thread_count;
-
     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