[vlc-devel] [PATCH 3/3] directx_va: don't allocate va_surfaces when using the external pool
Steve Lhomme
robux4 at videolabs.io
Wed Jun 28 17:33:50 CEST 2017
---
modules/codec/avcodec/directx_va.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c
index b8f7cc51d6..9705ae2f2c 100644
--- a/modules/codec/avcodec/directx_va.c
+++ b/modules/codec/avcodec/directx_va.c
@@ -315,8 +315,10 @@ int directx_va_Setup(vlc_va_t *va, directx_sys_t *dx_sys, const AVCodecContext *
if ( avctx->active_thread_type & FF_THREAD_FRAME )
surface_count += avctx->thread_count;
- return va_pool_Setup(va, &dx_sys->va_pool, avctx,
- surface_count, surface_alignment);
+ int err = va_pool_SetupDecoder(va, &dx_sys->va_pool, avctx, surface_count, surface_alignment);
+ if (err != VLC_SUCCESS)
+ return err;
+ return va_pool_SetupSurfaces(va, &dx_sys->va_pool, surface_count);
}
void directx_va_Close(vlc_va_t *va, directx_sys_t *dx_sys)
--
2.12.1
More information about the vlc-devel
mailing list