[FFmpeg-devel] [PATCH] examples/transcode: fix log message

Zhao Zhili quinkblack at foxmail.com
Thu Nov 30 17:57:31 EET 2023


From: Zhao Zhili <zhilizhao at tencent.com>

'encoder' can be audio or video encoder.
---
 doc/examples/transcode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/examples/transcode.c b/doc/examples/transcode.c
index ed6ac9fa03..a544ec0340 100644
--- a/doc/examples/transcode.c
+++ b/doc/examples/transcode.c
@@ -196,7 +196,7 @@ static int open_output_file(const char *filename)
             /* Third parameter can be used to pass settings to encoder */
             ret = avcodec_open2(enc_ctx, encoder, NULL);
             if (ret < 0) {
-                av_log(NULL, AV_LOG_ERROR, "Cannot open video encoder for stream #%u\n", i);
+                av_log(NULL, AV_LOG_ERROR, "Cannot open %s encoder for stream #%u\n", encoder->name, i);
                 return ret;
             }
             ret = avcodec_parameters_from_context(out_stream->codecpar, enc_ctx);
-- 
2.34.1



More information about the ffmpeg-devel mailing list