diff mbox series

[FFmpeg-devel] avcodec/decode: log hwaccel name

Message ID tencent_3758E0405A88344F8032342B3E2356079D09@qq.com
State Accepted
Commit c775163a8c032e20f25b79e63920f67e1b5b540d
Headers show
Series [FFmpeg-devel] avcodec/decode: log hwaccel name | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Zhao Zhili March 14, 2024, 3:40 a.m. UTC
From: Zhao Zhili <zhilizhao@tencent.com>

Many users mistakenly think that hwaccel is an instance of a decoder,
and cannot find the corresponding decoder name in the logs. Log
hwaccel name so user know hwaccel has taken effect.
---
 libavcodec/decode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 7c67b18bc4..d01b8a04f1 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -1371,8 +1371,8 @@  int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt)
             goto try_again;
         }
         if (hw_config->hwaccel) {
-            av_log(avctx, AV_LOG_DEBUG, "Format %s requires hwaccel "
-                   "initialisation.\n", desc->name);
+            av_log(avctx, AV_LOG_DEBUG, "Format %s requires hwaccel %s "
+                   "initialisation.\n", desc->name, hw_config->hwaccel->p.name);
             err = hwaccel_init(avctx, hw_config->hwaccel);
             if (err < 0)
                 goto try_again;