[vlc-commits] va_surface: fix the surface count when calling setup_avcodec_ctx
Steve Lhomme
git at videolan.org
Thu Jun 22 18:37:33 CEST 2017
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Thu Jun 22 18:29:09 2017 +0200| [b475fe41a472c3972217889770c5a4357fbd346c] | committer: Jean-Baptiste Kempf
va_surface: fix the surface count when calling setup_avcodec_ctx
fix black screen with DXVA2
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b475fe41a472c3972217889770c5a4357fbd346c
---
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;
}
More information about the vlc-commits
mailing list