[FFmpeg-cvslog] avformat/matroskaenc: log unsupported subtitle codec name

Zhao Zhili git at videolan.org
Tue Feb 4 07:43:50 EET 2025


ffmpeg | branch: master | Zhao Zhili <zhilizhao at tencent.com> | Tue Feb  4 01:17:39 2025 +0800| [4307008b9a81ae3322f742f557192ccc52517be2] | committer: Zhao Zhili

avformat/matroskaenc: log unsupported subtitle codec name

It's more user friendly than codec ID.

Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>
Reviewed-by: Marth64 <marth64 at proxyid.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4307008b9a81ae3322f742f557192ccc52517be2
---

 libavformat/matroskaenc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 3285735a7f..2e06f68304 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -2084,7 +2084,8 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
 
     case AVMEDIA_TYPE_SUBTITLE:
         if (!native_id) {
-            av_log(s, AV_LOG_ERROR, "Subtitle codec %d is not supported.\n", par->codec_id);
+            av_log(s, AV_LOG_ERROR, "Subtitle codec %s (%d) is not supported.\n",
+                    avcodec_get_name(par->codec_id), par->codec_id);
             return AVERROR(ENOSYS);
         }
         if (!IS_WEBM(mkv) && st->disposition & AV_DISPOSITION_DESCRIPTIONS)



More information about the ffmpeg-cvslog mailing list