Message ID | 20210409103424.55429-1-liuqi05@kuaishou.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] avfilter/vf_overlay_cuda: check ctx->hwctx->internal null pointer | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
On 09.04.2021 12:34, Steven Liu wrote: > - if (ctx->hwctx && ctx->cu_module) { > + if (ctx->hwctx && ctx->cu_module && ctx->hwctx->internal) { > CUcontext dummy; > CudaFunctions *cu = ctx->hwctx->internal->cuda_dl; > CHECK_CU(cu->cuCtxPushCurrent(ctx->cu_ctx)); > How can this happen at this point? Did something else prematurely free the hwctx? This makes me think that the filter is missing a buffer ref somewhere to prevent things from getting freed too early.
Can you test if https://github.com/BtbN/FFmpeg/commit/454d5c5d3eda7b5356f961a0e1b66f3a56d95363 Also fixes the issue? I'm unable to reproduce the crash.
Timo Rothenpieler <timo@rothenpieler.org> 于2021年4月10日周六 下午8:34写道: > > Can you test if > https://github.com/BtbN/FFmpeg/commit/454d5c5d3eda7b5356f961a0e1b66f3a56d95363 > Also fixes the issue? Yes, it can fix the issue Thanks Timo. Thanks Steven
diff --git a/libavfilter/vf_overlay_cuda.c b/libavfilter/vf_overlay_cuda.c index f6ee43e929..4d8617475f 100644 --- a/libavfilter/vf_overlay_cuda.c +++ b/libavfilter/vf_overlay_cuda.c @@ -249,7 +249,7 @@ static av_cold void overlay_cuda_uninit(AVFilterContext *avctx) ff_framesync_uninit(&ctx->fs); - if (ctx->hwctx && ctx->cu_module) { + if (ctx->hwctx && ctx->cu_module && ctx->hwctx->internal) { CUcontext dummy; CudaFunctions *cu = ctx->hwctx->internal->cuda_dl; CHECK_CU(cu->cuCtxPushCurrent(ctx->cu_ctx));