aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJai Menon <jmenon86@gmail.com>2010-03-25 14:34:19 +0000
committerJai Menon <jmenon86@gmail.com>2010-03-25 14:34:19 +0000
commit4896dd57facf9293038aa8d6fa95df81f9ae549a (patch)
tree7b78ea989f64d41db3994184cddcb4948dd1f774
parentb26708d5d1c92932ff497fb3577f4e61acc436ac (diff)
downloadffmpeg-4896dd57facf9293038aa8d6fa95df81f9ae549a.tar.gz
Matroska muxer : Don't create audio tracks for unsupported audio codecs.
Originally committed as revision 22669 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/matroskaenc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 2b17154539..0a17c73d46 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -493,12 +493,14 @@ static int mkv_write_codecprivate(AVFormatContext *s, ByteIOContext *pb, AVCodec
}
} else if (codec->codec_type == CODEC_TYPE_AUDIO) {
- if (!codec->codec_tag)
- codec->codec_tag = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id);
- if (!codec->codec_tag) {
+ unsigned int tag;
+ tag = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id);
+ if (!tag) {
av_log(s, AV_LOG_ERROR, "No wav codec ID found.\n");
ret = -1;
}
+ if (!codec->codec_tag)
+ codec->codec_tag = tag;
ff_put_wav_header(dyn_cp, codec);
}