diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/buildsteps/windows/patches/0005-ffmpeg-windows-dxva2-check-nullptr-surface.patch | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/buildsteps/windows/patches/0005-ffmpeg-windows-dxva2-check-nullptr-surface.patch b/tools/buildsteps/windows/patches/0005-ffmpeg-windows-dxva2-check-nullptr-surface.patch new file mode 100644 index 0000000000..b3e572859b --- /dev/null +++ b/tools/buildsteps/windows/patches/0005-ffmpeg-windows-dxva2-check-nullptr-surface.patch @@ -0,0 +1,12 @@ +diff --git a/libavcodec/dxva2.c b/libavcodec/dxva2.c +--- a/libavcodec/dxva2.c ++++ b/libavcodec/dxva2.c +@@ -777,7 +777,7 @@ unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx, + #if CONFIG_D3D11VA + if (avctx->pix_fmt == AV_PIX_FMT_D3D11) + return (intptr_t)frame->data[1]; +- if (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD) { ++ if (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD && surface) { + D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC viewDesc; + ID3D11VideoDecoderOutputView_GetDesc((ID3D11VideoDecoderOutputView*) surface, &viewDesc); + return viewDesc.Texture2D.ArraySlice; |