This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 6896ab9eebe6397712560e806bc2cca19d5fc143
Author:     Julius Bairaktaris <[email protected]>
AuthorDate: Sun Aug 30 15:53:03 2026 +0200
Commit:     ArazIusubov <[email protected]>
CommitDate: Wed Sep 16 22:05:28 2026 +0000

    avfilter/amf: log CreateComponent failures on the filter context
    
    These four call sites pass the filter's private context to av_log() while
    every other call around them passes the AVFilterContext. Both happen to
    start with an AVClass, so nothing misbehaves, but the private class has
    no parent set, so the message loses the "[Parsed_sr_amf_0 @ ...]" prefix
    that identifies which filter instance failed.
    
    Assisted-by: Claude Opus 5
    Signed-off-by: Julius Bairaktaris <[email protected]>
---
 libavfilter/vf_sr_amf.c  | 4 ++--
 libavfilter/vf_vpp_amf.c | 2 +-
 libavfilter/vsrc_amf.c   | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_sr_amf.c b/libavfilter/vf_sr_amf.c
index fcaf2c5d2a..cfde4886b1 100644
--- a/libavfilter/vf_sr_amf.c
+++ b/libavfilter/vf_sr_amf.c
@@ -157,7 +157,7 @@ static int amf_filter_config_output(AVFilterLink *outlink)
         AMFSize in_size = { inlink->w, inlink->h };
 
         res = 
ctx->amf_device_ctx->factory->pVtbl->CreateComponent(ctx->amf_device_ctx->factory,
 ctx->amf_device_ctx->context, AMFVideoConverter, &ctx->pre_converter);
-        AMF_RETURN_IF_FALSE(ctx, res == AMF_OK, AVERROR_FILTER_NOT_FOUND, 
"CreateComponent(%ls) failed with error %d\n", AMFVideoConverter, res);
+        AMF_RETURN_IF_FALSE(avctx, res == AMF_OK, AVERROR_FILTER_NOT_FOUND, 
"CreateComponent(%ls) failed with error %d\n", AMFVideoConverter, res);
 
         AMF_ASSIGN_PROPERTY_INT64(res, ctx->pre_converter, 
AMF_VIDEO_CONVERTER_OUTPUT_FORMAT, (amf_int32)av_av_to_amf_format(ctx->format));
         AMF_RETURN_IF_FALSE(avctx, res == AMF_OK, AVERROR_UNKNOWN, 
"AMFConverter-SetProperty() failed with error %d\n", res);
@@ -182,7 +182,7 @@ static int amf_filter_config_output(AVFilterLink *outlink)
     }
     // FIXME: add checks whether we have HW context
     res = 
ctx->amf_device_ctx->factory->pVtbl->CreateComponent(ctx->amf_device_ctx->factory,
 ctx->amf_device_ctx->context, AMFHQScaler, &ctx->component);
-    AMF_RETURN_IF_FALSE(ctx, res == AMF_OK, AVERROR_FILTER_NOT_FOUND, 
"CreateComponent(%ls) failed with error %d\n", AMFHQScaler, res);
+    AMF_RETURN_IF_FALSE(avctx, res == AMF_OK, AVERROR_FILTER_NOT_FOUND, 
"CreateComponent(%ls) failed with error %d\n", AMFHQScaler, res);
 
     mem_type = av_amf_get_memory_type(ctx->amf_device_ctx);
     if (mem_type != AMF_MEMORY_UNKNOWN)
diff --git a/libavfilter/vf_vpp_amf.c b/libavfilter/vf_vpp_amf.c
index 9ccc667a94..f9ed2dc635 100644
--- a/libavfilter/vf_vpp_amf.c
+++ b/libavfilter/vf_vpp_amf.c
@@ -94,7 +94,7 @@ static int amf_filter_config_output(AVFilterLink *outlink)
     // FIXME: add checks whether we have HW context
     hwframes_out = (AVHWFramesContext*)ctx->hwframes_out_ref->data;
     res = 
ctx->amf_device_ctx->factory->pVtbl->CreateComponent(ctx->amf_device_ctx->factory,
 ctx->amf_device_ctx->context, AMFVideoConverter, &ctx->component);
-    AMF_RETURN_IF_FALSE(ctx, res == AMF_OK, AVERROR_FILTER_NOT_FOUND, 
"CreateComponent(%ls) failed with error %d\n", AMFVideoConverter, res);
+    AMF_RETURN_IF_FALSE(avctx, res == AMF_OK, AVERROR_FILTER_NOT_FOUND, 
"CreateComponent(%ls) failed with error %d\n", AMFVideoConverter, res);
 
     mem_type = av_amf_get_memory_type(ctx->amf_device_ctx);
     if (mem_type != AMF_MEMORY_UNKNOWN)
diff --git a/libavfilter/vsrc_amf.c b/libavfilter/vsrc_amf.c
index 2a9811ae4a..e3fb8b9d38 100644
--- a/libavfilter/vsrc_amf.c
+++ b/libavfilter/vsrc_amf.c
@@ -159,7 +159,7 @@ static int amf_init_vsrc(AVFilterLink *outlink)
                                                           
amf_device_ctx->context,
                                                           AMFDisplayCapture,
                                                           &ctx->capture);
-    AMF_RETURN_IF_FALSE(ctx, res == AMF_OK, AVERROR_FILTER_NOT_FOUND, 
"CreateComponent(%ls) failed with error %d\n", AMFDisplayCapture, res);
+    AMF_RETURN_IF_FALSE(avctx, res == AMF_OK, AVERROR_FILTER_NOT_FOUND, 
"CreateComponent(%ls) failed with error %d\n", AMFDisplayCapture, res);
 
     AMF_ASSIGN_PROPERTY_INT64(res, ctx->capture, 
AMF_DISPLAYCAPTURE_MONITOR_INDEX, ctx->monitor_index);
     if (res != AMF_OK) {

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to