Fix segv when stream copy and validate_tag fails, st->codec->codec is not set
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Thu, 12 Aug 2010 00:35:19 +0000 (00:35 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Thu, 12 Aug 2010 00:35:19 +0000 (00:35 +0000)
Originally committed as revision 24782 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/utils.c

index fb0554b..8853a65 100644 (file)
@@ -2699,8 +2699,8 @@ int av_write_header(AVFormatContext *s)
                     char tagbuf[32];
                     av_get_codec_tag_string(tagbuf, sizeof(tagbuf), st->codec->codec_tag);
                     av_log(s, AV_LOG_ERROR,
-                           "Tag %s/0x%08x incompatible with output codec '%s'\n",
-                           tagbuf, st->codec->codec_tag, st->codec->codec->name);
+                           "Tag %s/0x%08x incompatible with output codec id '%d'\n",
+                           tagbuf, st->codec->codec_tag, st->codec->codec_id);
                     return AVERROR_INVALIDDATA;
                 }
             }else