Commit 30fc7105 authored by Michael Niedermayer's avatar Michael Niedermayer

lavf: print a matching tag in case of code tag validation failure

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 44391f70
...@@ -3179,11 +3179,12 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options) ...@@ -3179,11 +3179,12 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options)
} }
if(st->codec->codec_tag){ if(st->codec->codec_tag){
if (!validate_codec_tag(s, st)) { 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(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, av_log(s, AV_LOG_ERROR,
"Tag %s/0x%08x incompatible with output codec id '%d'\n", "Tag %s/0x%08x incompatible with output codec id '%d' (%s)\n",
tagbuf, st->codec->codec_tag, st->codec->codec_id); tagbuf, st->codec->codec_tag, st->codec->codec_id, cortag);
ret = AVERROR_INVALIDDATA; ret = AVERROR_INVALIDDATA;
goto fail; goto fail;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment