[vlc-commits] directx_va: no need to store temporarily the number of threads

Steve Lhomme git at videolan.org
Tue Jun 13 15:00:39 CEST 2017


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Mon May 29 14:01:34 2017 +0200| [a031cf8a176c90b447493442ca6aeb21a268594c] | committer: Jean-Baptiste Kempf

directx_va: no need to store temporarily the number of threads

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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 d07fc360cf..914e3a4536 100644
--- a/modules/codec/avcodec/directx_va.c
+++ b/modules/codec/avcodec/directx_va.c
@@ -321,7 +321,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;
@@ -493,8 +493,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 be139ad06f..46b83366df 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];
     D3D_DecoderSurface  *hw_surface[MAX_SURFACE_COUNT];



More information about the vlc-commits mailing list