[vlc-commits] d3d11va: move variables where they really used
Steve Lhomme
git at videolan.org
Fri Jan 20 14:31:46 CET 2017
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Thu Jan 19 11:10:40 2017 +0100| [6e0da681cd2b61585ce46894bb426aa5d8788d43] | committer: Jean-Baptiste Kempf
d3d11va: move variables where they really used
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6e0da681cd2b61585ce46894bb426aa5d8788d43
---
modules/codec/avcodec/d3d11va.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index b139b8a..0bb2ffd 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -258,10 +258,8 @@ static int Extract(vlc_va_t *va, picture_t *output, uint8_t *data)
case VLC_CODEC_D3D11_OPAQUE_10B:
{
picture_sys_t *p_sys_out = output->p_sys;
- picture_sys_t *p_sys_in = surface->p_pic->p_sys;
assert(p_sys_out->texture != NULL);
- assert(p_sys_in->decoder == src);
if( sys->context_mutex != INVALID_HANDLE_VALUE ) {
WaitForSingleObjectEx( sys->context_mutex, INFINITE, FALSE );
@@ -270,6 +268,9 @@ static int Extract(vlc_va_t *va, picture_t *output, uint8_t *data)
#ifdef ID3D11VideoContext_VideoProcessorBlt
if (sys->videoProcessor)
{
+ picture_sys_t *p_sys_in = surface->p_pic->p_sys;
+ assert(p_sys_in->decoder == src);
+
// extract the decoded video to a the output Texture
if (p_sys_out->decoder == NULL)
{
@@ -308,10 +309,12 @@ static int Extract(vlc_va_t *va, picture_t *output, uint8_t *data)
else
#endif
{
+ picture_sys_t *p_sys_in = surface->p_pic->p_sys;
+ assert(p_sys_in->decoder == src);
+
D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC viewDesc;
ID3D11VideoDecoderOutputView_GetDesc( src, &viewDesc );
-
D3D11_TEXTURE2D_DESC dstDesc;
ID3D11Texture2D_GetDesc( (ID3D11Texture2D*) p_sys_out->texture, &dstDesc);
More information about the vlc-commits
mailing list