Skip to content

Commit

Permalink
NVENC: change cuCtxCreate flag to avoid CPU spins
Browse files Browse the repository at this point in the history
  • Loading branch information
BtbN committed Dec 9, 2015
1 parent e2289b6 commit 2823e17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ObsNvenc/src/NVENCEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ void NVENCEncoder::init()
stEncodeSessionParams.apiVersion = NVENCAPI_VERSION;

cuContext = 0;
checkCudaErrors(cuCtxCreate(&cuContext, 0, pNvencDevices[iNvencUseDeviceID]));
checkCudaErrors(cuCtxCreate(&cuContext, 4, pNvencDevices[iNvencUseDeviceID]));
checkCudaErrors(cuCtxPopCurrent(&cuContextCurr));

stEncodeSessionParams.device = (void*)cuContext;
Expand Down

0 comments on commit 2823e17

Please sign in to comment.