From 0b7827cd10e4a44b056a9c9d78125366ba91eaae Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Mon, 11 Aug 2025 15:14:32 +0200 Subject: [PATCH] avfilter/vf_blackdetect: log with correct filter ID If we use the private BlackDetectContext for logging, the filter ID does not get printed alongside the filter name. Using the parent AVFilterContext makes this consistent with other filters. --- libavfilter/vf_blackdetect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_blackdetect.c b/libavfilter/vf_blackdetect.c index b233bdfd60..27130170a3 100644 --- a/libavfilter/vf_blackdetect.c +++ b/libavfilter/vf_blackdetect.c @@ -140,7 +140,7 @@ static int config_input(AVFilterLink *inlink) if (!s->counter) return AVERROR(ENOMEM); - av_log(s, AV_LOG_VERBOSE, + av_log(ctx, AV_LOG_VERBOSE, "black_min_duration:%s pixel_black_th:%f picture_black_ratio_th:%f alpha:%d\n", av_ts2timestr(s->black_min_duration, &s->time_base), s->pixel_black_th, s->picture_black_ratio_th, s->alpha); @@ -152,7 +152,7 @@ static void check_black_end(AVFilterContext *ctx) BlackDetectContext *s = ctx->priv; if ((s->black_end - s->black_start) >= s->black_min_duration) { - av_log(s, AV_LOG_INFO, + av_log(ctx, AV_LOG_INFO, "black_start:%s black_end:%s black_duration:%s\n", av_ts2timestr(s->black_start, &s->time_base), av_ts2timestr(s->black_end, &s->time_base),