From bd204692abd1746c22c72f69ecba832025267286 Mon Sep 17 00:00:00 2001 From: phunkyfish Date: Thu, 8 Feb 2024 10:40:07 +0000 Subject: [PATCH 1/2] Patch to check for nullptr on surface for dxva2 on windows --- ...-ffmpeg-windows-dxva2-check-nullptr-surface.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 depends/common/ffmpeg/0005-ffmpeg-windows-dxva2-check-nullptr-surface.patch 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; From 7804e51fcfb01c2c3e36ed3d668561d449c0b709 Mon Sep 17 00:00:00 2001 From: phunkyfish Date: Thu, 8 Feb 2024 10:18:10 +0000 Subject: [PATCH 2/2] changelog and version v21.3.3 --- inputstream.ffmpegdirect/addon.xml.in | 2 +- inputstream.ffmpegdirect/changelog.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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