1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-03-23 04:24:35 +02:00

Make the error message issued in case of invalid codec tag more

informative.

Originally committed as revision 23423 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Stefano Sabatini 2010-06-02 10:54:53 +00:00
parent ab0b53786b
commit b603ab8dc1

View File

@ -2656,9 +2656,11 @@ int av_write_header(AVFormatContext *s)
if(s->oformat->codec_tag){ if(s->oformat->codec_tag){
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];
av_get_codec_tag_string(tagbuf, sizeof(tagbuf), st->codec->codec_tag);
av_log(s, AV_LOG_ERROR, av_log(s, AV_LOG_ERROR,
"Tag 0x%08x incompatible with output codec\n", "Tag %s/0x%08x incompatible with output codec '%s'\n",
st->codec->codec_tag); tagbuf, st->codec->codec_tag, st->codec->codec->name);
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
}else }else