[vlc-devel] [PATCH 03/39] d3d11va: fix the internal pool use with direct decode builds

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


ie builds with recent libavcodec
There is still an issue with the internal pool as the ouput picture in Extract
may not be allocated by the proper vout and therefore lack the proper
picture_sys_t data.
---
 modules/codec/avcodec/d3d11va.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index a5ca9e5e91..cfec0e0ed8 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -293,6 +293,12 @@ static int Get(vlc_va_t *va, picture_t *pic, uint8_t **data)
 {
 #if D3D11_DIRECT_DECODE
     picture_sys_t *p_sys = pic->p_sys;
+    if (p_sys == NULL)
+    {
+        assert(!va->sys->b_extern_pool);
+        return directx_va_Get(va, &va->sys->dx_sys, pic, data);
+    }
+
     if (p_sys->decoder == NULL)
     {
         HRESULT hr;
@@ -439,7 +445,7 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
     va->setup   = Setup;
     va->get     = Get;
 #if D3D11_DIRECT_DECODE
-    va->release = NULL;
+    va->release = sys->b_extern_pool ? NULL : directx_va_Release;
 #else
     va->release = directx_va_Release;
 #endif
-- 
2.12.1



More information about the vlc-devel mailing list