diff --git a/depends/common/ffmpeg/0005-ffmpeg-windows-dxva2-check-nullptr-surface.patch b/depends/common/ffmpeg/0005-ffmpeg-windows-dxva2-check-nullptr-surface.patch new file mode 100644 index 00000000..b3e57285 --- /dev/null +++ b/depends/common/ffmpeg/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; diff --git a/inputstream.ffmpegdirect/addon.xml.in b/inputstream.ffmpegdirect/addon.xml.in index aede7fa1..cad51bb6 100644 --- a/inputstream.ffmpegdirect/addon.xml.in +++ b/inputstream.ffmpegdirect/addon.xml.in @@ -1,7 +1,7 @@ @ADDON_DEPENDS@ diff --git a/inputstream.ffmpegdirect/changelog.txt b/inputstream.ffmpegdirect/changelog.txt index f78ab1c2..3962e5f6 100644 --- a/inputstream.ffmpegdirect/changelog.txt +++ b/inputstream.ffmpegdirect/changelog.txt @@ -1,3 +1,6 @@ +v21.3.3 +- Patch to check for nullptr on surface for dxva2 on window + v21.3.2 - Fix deprecations for m_pFormatContext's codecpar->channels for streams ffmpeg6 and a single use of vsprintf