[FFmpeg-devel] [PATCH 8/8] Make the error message issued in case of invalid codec tag more informative.

Stefano Sabatini stefano.sabatini-lala
Tue Jun 1 12:58:29 CEST 2010


---
 libavformat/utils.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index bd8c6bc..28d0915 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2654,9 +2654,11 @@ int av_write_header(AVFormatContext *s)
         if(s->oformat->codec_tag){
             if(st->codec->codec_tag){
                 if (!validate_codec_tag(s, st)) {
+                    char tagbuf[32];
+                    av_get_codec_tag_string(tagbuf, sizeof(tagbuf), st->codec->codec_tag);
                     av_log(s, AV_LOG_ERROR,
-                           "Tag 0x%08x incompatible with output codec\n",
-                           st->codec->codec_tag);
+                           "Tag %s / 0x%08x incompatible with output codec '%s'\n",
+                           tagbuf, st->codec->codec_tag, st->codec->codec->name);
                     return AVERROR_INVALIDDATA;
                 }
             }else
-- 
1.7.1




More information about the ffmpeg-devel mailing list