PR #25639 opened by JuliusBairaktaris URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25639 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25639.patch
The Forgejo_Fairy review of #23019 noted that `amf_transfer_data_from()` logs AVERROR_UNKNOWN instead of the AMF result when `Convert(AMF_MEMORY_HOST)` fails, so the log always shows the same number. This passes the result instead. #23019 and #25458 touch the same function; the rebase is trivial either way. Built with mingw-w64 (`-Werror=format`); only the log text changes. Written with Claude Opus 5.5 in Claude Code; `Assisted-by` trailer on the commit. >From e421e42e392a2c885c2b5c2abc180a1d697293e9 Mon Sep 17 00:00:00 2001 From: Julius Bairaktaris <[email protected]> Date: Sat, 31 Oct 2026 12:20:24 +0100 Subject: [PATCH] avutil/hwcontext_amf: log the Convert() result on download failures amf_transfer_data_from() printed AVERROR_UNKNOWN as the error of a failed Convert(AMF_MEMORY_HOST) instead of the AMF result, so the log always showed the same number and the runtime's reason was lost. Reported by the Forgejo_Fairy review of #23019. Assisted-by: Claude Opus 5.5 Signed-off-by: Julius Bairaktaris <[email protected]> --- libavutil/hwcontext_amf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/hwcontext_amf.c b/libavutil/hwcontext_amf.c index 7f47df5b59d..2ace60b4442 100644 --- a/libavutil/hwcontext_amf.c +++ b/libavutil/hwcontext_amf.c @@ -507,7 +507,7 @@ static int amf_transfer_data_from(AVHWFramesContext *ctx, AVFrame *dst, return AVERROR(EINVAL); ret = surface->pVtbl->Convert(surface, AMF_MEMORY_HOST); - AMF_RETURN_IF_FALSE(ctx, ret == AMF_OK, AVERROR_UNKNOWN, "Convert(amf::AMF_MEMORY_HOST) failed with error %d\n", AVERROR_UNKNOWN); + AMF_RETURN_IF_FALSE(ctx, ret == AMF_OK, AVERROR_UNKNOWN, "Convert(amf::AMF_MEMORY_HOST) failed with error %d\n", ret); planes = (int)surface->pVtbl->GetPlanesCount(surface); av_assert0(planes < FF_ARRAY_ELEMS(src_data)); -- 2.54.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
