[vlc-commits] d3d11va: fix passing surfaces from the local pool to upstream filters
Steve Lhomme
git at videolan.org
Tue Jun 13 14:59:30 CEST 2017
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Fri May 19 15:44:19 2017 +0200| [06649dde79dd83318819d04db82db55a4483c9db] | committer: Jean-Baptiste Kempf
d3d11va: fix passing surfaces from the local pool to upstream filters
When not in direct rendering
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=06649dde79dd83318819d04db82db55a4483c9db
---
modules/codec/avcodec/d3d11va.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index cfec0e0ed8..84f997649d 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -179,10 +179,10 @@ static int Extract(vlc_va_t *va, picture_t *output, uint8_t *data)
{
vlc_va_sys_t *sys = va->sys;
ID3D11VideoDecoderOutputView *src = (ID3D11VideoDecoderOutputView*)(uintptr_t)data;
- vlc_va_surface_t *surface = output->context;
+ vlc_va_surface_t *surface = output->context; /* when coming from our local pool */
int ret = VLC_SUCCESS;
- picture_sys_t *p_sys_out = output->p_sys;
+ picture_sys_t *p_sys_out = surface ? surface->p_pic->p_sys : output->p_sys;
assert(p_sys_out->texture[KNOWN_DXGI_INDEX] != NULL);
@@ -267,6 +267,9 @@ done:
}
}
#endif
+ if (!output->p_sys && surface->p_pic && surface->p_pic->p_sys)
+ /* HW decoding in a software pipe, pass the texture to upstream filters */
+ output->p_sys = surface->p_pic->p_sys;
return ret;
}
More information about the vlc-commits
mailing list