X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fthirdparty%2Fsrc%2Fffmpeg.git.patch10;fp=cinelerra-5.1%2Fthirdparty%2Fsrc%2Fffmpeg.git.patch10;h=c94880d020e778fb7db7558eabbef24a87d81c12;hp=0000000000000000000000000000000000000000;hb=5f4783cf32ed1dd15dc023668284e95028080403;hpb=8a5c77cd787cd083c94a8f538dbbc0d548460646 diff --git a/cinelerra-5.1/thirdparty/src/ffmpeg.git.patch10 b/cinelerra-5.1/thirdparty/src/ffmpeg.git.patch10 new file mode 100644 index 00000000..c94880d0 --- /dev/null +++ b/cinelerra-5.1/thirdparty/src/ffmpeg.git.patch10 @@ -0,0 +1,34 @@ +--- a/libavutil/hwcontext_cuda.c ++++ b/libavutil/hwcontext_cuda.c +@@ -286,9 +286,11 @@ + CudaFunctions *cu = hwctx->internal->cuda_dl; + + if (hwctx->internal->is_allocated && hwctx->cuda_ctx) { ++#ifdef CUDA_PRIMARY_CTX + if (hwctx->internal->flags & AV_CUDA_USE_PRIMARY_CONTEXT) + CHECK_CU(cu->cuDevicePrimaryCtxRelease(hwctx->internal->cuda_device)); + else ++#endif + CHECK_CU(cu->cuCtxDestroy(hwctx->cuda_ctx)); + + hwctx->cuda_ctx = NULL; +@@ -338,7 +340,7 @@ + cu = hwctx->internal->cuda_dl; + + hwctx->internal->flags = flags; +- ++#ifdef CUDA_PRIMARY_CTX + if (flags & AV_CUDA_USE_PRIMARY_CONTEXT) { + ret = CHECK_CU(cu->cuDevicePrimaryCtxGetState(hwctx->internal->cuda_device, + &dev_flags, &dev_active)); +@@ -359,7 +361,9 @@ + hwctx->internal->cuda_device)); + if (ret < 0) + return ret; +- } else { ++ } else ++#endif ++ { + ret = CHECK_CU(cu->cuCtxCreate(&hwctx->cuda_ctx, desired_flags, + hwctx->internal->cuda_device)); + if (ret < 0)