more fixes

This commit is contained in:
jojo61 2018-10-11 22:12:22 +02:00
parent 961332309c
commit 53ef055f5e
1 changed files with 2 additions and 0 deletions

View File

@ -1765,6 +1765,7 @@ static void CuvidDestroySurfaces(CuvidDecoder * decoder)
GlxCheck();
if (decoder->cuda_ctx) {
checkCudaErrors(cuCtxPushCurrent(decoder->cuda_ctx));
for (i=0;i<decoder->SurfacesNeeded;i++) {
for (j=0;j<2;j++) {
if (decoder->cu_res[i][j]) {
@ -1773,6 +1774,7 @@ static void CuvidDestroySurfaces(CuvidDecoder * decoder)
}
}
}
checkCudaErrors(cuCtxPopCurrent(NULL));
}