X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fthirdparty%2Fsrc%2Fffmpeg.git.patch9;h=40eb4f1a895174d240bd3231a37b853b09485352;hb=5f4783cf32ed1dd15dc023668284e95028080403;hp=ad17541c0a141cf7b2138cd71670764e374567a8;hpb=86c9537e0540010ff43b16feb4cd7de98409eba1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/thirdparty/src/ffmpeg.git.patch9 b/cinelerra-5.1/thirdparty/src/ffmpeg.git.patch9 index ad17541c..40eb4f1a 100644 --- a/cinelerra-5.1/thirdparty/src/ffmpeg.git.patch9 +++ b/cinelerra-5.1/thirdparty/src/ffmpeg.git.patch9 @@ -1,36 +1,14 @@ -diff --git a/libavutil/hwcontext_cuda.c b/libavutil/hwcontext_cuda.c -index a87c280cf7..718def3dab 100644 ---- a/libavutil/hwcontext_cuda.c -+++ b/libavutil/hwcontext_cuda.c -@@ -296,9 +296,11 @@ static void cuda_device_uninit(AVHWDeviceContext *device_ctx) - CudaFunctions *cu = hwctx->internal->cuda_dl; +--- a/libavformat/mpegenc.c ++++ b/libavformat/mpegenc.c +@@ -976,9 +976,9 @@ + PacketDesc *pkt_desc; - 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; -@@ -348,7 +350,7 @@ static int cuda_context_init(AVHWDeviceContext *device_ctx, int flags) { - 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)); -@@ -369,7 +371,9 @@ static int cuda_context_init(AVHWDeviceContext *device_ctx, int flags) { - 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) + while ((pkt_desc = stream->predecode_packet) && ++ pkt_desc != stream->premux_packet && + scr > pkt_desc->dts) { // FIXME: > vs >= +- if (stream->buffer_index < pkt_desc->size || +- stream->predecode_packet == stream->premux_packet) { ++ if (stream->buffer_index < pkt_desc->size) { + av_log(ctx, AV_LOG_ERROR, + "buffer underflow st=%d bufi=%d size=%d\n", + i, stream->buffer_index, pkt_desc->size);