[vlc-devel] [PATCH] va_surface: fix the surface count when calling setup_avcodec_ctx
Steve Lhomme
robux4 at videolabs.io
Thu Jun 22 18:29:09 CEST 2017
fix black screen with DXVA2
---
modules/codec/avcodec/va_surface.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/codec/avcodec/va_surface.c b/modules/codec/avcodec/va_surface.c
index fe15966888..a4b384c5e0 100644
--- a/modules/codec/avcodec/va_surface.c
+++ b/modules/codec/avcodec/va_surface.c
@@ -110,12 +110,13 @@ int va_pool_Setup(vlc_va_t *va, va_pool_t *va_pool, const AVCodecContext *avctx,
va_pool->surface_width = surface_width;
va_pool->surface_height = surface_height;
-
- va_pool->pf_setup_avcodec_ctx(va);
err = VLC_SUCCESS;
done:
va_pool->surface_count = i;
+ if (err == VLC_SUCCESS)
+ va_pool->pf_setup_avcodec_ctx(va);
+
return err;
}
--
2.12.1
More information about the vlc-devel
mailing list