-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #278 from phunkyfish/patch-dxva2-windows
Patch dxva2 windows
- Loading branch information
Showing
3 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
depends/common/ffmpeg/0005-ffmpeg-windows-dxva2-check-nullptr-surface.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters