diff options
author | wm4 <wm4@nowhere> | 2017-11-02 15:53:22 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-11-02 15:58:36 +0100 |
commit | ff17760c0009dc02458e5a4c6fc114d3b5d3408d (patch) | |
tree | 8aa70cb363846103d80b814ed783ee3435794cd4 /video/decode/d3d.c | |
parent | 09c61347a8481cfb42bfc381880bd3fe93c4e744 (diff) |
vd_lavc: restore --hwdec-image-format and d3d11 opaque mode
When the ifdeffery for the frame_params API was added, the new code
accidentally didn't include this.
Diffstat (limited to 'video/decode/d3d.c')
-rw-r--r-- | video/decode/d3d.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/video/decode/d3d.c b/video/decode/d3d.c index bdc907bd71..c7b2afd470 100644 --- a/video/decode/d3d.c +++ b/video/decode/d3d.c @@ -87,7 +87,10 @@ void d3d_hwframes_refine(struct lavc_ctx *ctx, AVBufferRef *hw_frames_ctx) if (fctx->format == AV_PIX_FMT_D3D11) { AVD3D11VAFramesContext *hwctx = fctx->hwctx; - hwctx->BindFlags |= D3D11_BIND_SHADER_RESOURCE; + // According to hwcontex_d3d11va.h, yuv420p means DXGI_FORMAT_420_OPAQUE, + // which has no shader support. + if (fctx->sw_format != AV_PIX_FMT_YUV420P) + hwctx->BindFlags |= D3D11_BIND_SHADER_RESOURCE; } } |