Skip to content

Commit

Permalink
DX Crash fix for stereo mode sets
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler Gibson committed Jan 25, 2018
1 parent 626b0a9 commit 571ac3f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
@@ -0,0 +1,5 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Make sure patch files only use lf.
*.patch text eol=lf
16 changes: 16 additions & 0 deletions Libraries/WebRTC/nvencodeDXCrashFix.patch
@@ -0,0 +1,16 @@
diff --git a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
index d361b8a4f..978e90181 100644
--- a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
+++ b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
@@ -376,7 +376,10 @@ NVENCSTATUS H264EncoderImpl::Deinitialize()
ReleaseIOBuffers();
nvStatus = m_pNvHWEncoder->NvEncDestroyEncoder();

- __cu(cuCtxDestroy(m_cuContext));
+ if (!m_d3dDevice)
+ {
+ __cu(cuCtxDestroy(m_cuContext));
+ }
return nvStatus;
}

0 comments on commit 571ac3f

Please sign in to comment.