aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-11 16:52:47 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-11 16:52:47 +0200
commit30fc71055616c2929e94915e983460629a0d27fa (patch)
treed0757e01d7df2dbf353f5ec63b20469aa588485a
parent44391f706b0be13e74b2432b57a6597b210a989c (diff)
downloadffmpeg-30fc71055616c2929e94915e983460629a0d27fa.tar.gz
lavf: print a matching tag in case of code tag validation failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/utils.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index fd9e4d5309..4e26a21b10 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3179,11 +3179,12 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options)
}
if(st->codec->codec_tag){
if (!validate_codec_tag(s, st)) {
- char tagbuf[32];
+ char tagbuf[32], cortag[32];
av_get_codec_tag_string(tagbuf, sizeof(tagbuf), st->codec->codec_tag);
+ av_get_codec_tag_string(cortag, sizeof(cortag), av_codec_get_tag(s->oformat->codec_tag, st->codec->codec_id));
av_log(s, AV_LOG_ERROR,
- "Tag %s/0x%08x incompatible with output codec id '%d'\n",
- tagbuf, st->codec->codec_tag, st->codec->codec_id);
+ "Tag %s/0x%08x incompatible with output codec id '%d' (%s)\n",
+ tagbuf, st->codec->codec_tag, st->codec->codec_id, cortag);
ret = AVERROR_INVALIDDATA;
goto fail;
}