aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2013-01-24 02:30:40 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-01-24 02:46:38 +0100
commit9103d77ffc0ee9f994555a50fd50eeb1861afb03 (patch)
tree78f1357b94bc3b2dfc99a45c090e1e8589ec15fd
parent8b48e2c654cd75ef960d71fedecdce1e1175b8ed (diff)
downloadffmpeg-9103d77ffc0ee9f994555a50fd50eeb1861afb03.tar.gz
matroskaenc: add codec_tag lists back.
This reverts 312645e : "Do not set codec_tag property for matroska muxers." Also adds dummy codec_tag lists with codecs supported in mkv but not in wav / avi. Fixes ticket #2169. (cherry picked from commit df39c3ce385c02cbd8046298578ea7454c0a0f81) Conflicts: libavformat/matroskaenc.c
-rw-r--r--libavformat/matroska.c3
-rw-r--r--libavformat/matroskaenc.c33
2 files changed, 36 insertions, 0 deletions
diff --git a/libavformat/matroska.c b/libavformat/matroska.c
index 52481d7556..a5a4363cc0 100644
--- a/libavformat/matroska.c
+++ b/libavformat/matroska.c
@@ -21,6 +21,9 @@
#include "matroska.h"
+/* If you add a tag here that is not in ff_codec_bmp_tags[]
+ or ff_codec_wav_tags[], add it also to additional_audio_tags[]
+ or additional_video_tags[] in matroskaenc.c */
const CodecTags ff_mkv_codec_tags[]={
{"A_AAC" , CODEC_ID_AAC},
{"A_AC3" , CODEC_ID_AC3},
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index b8c4667a4e..e556b3c3e9 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1295,6 +1295,32 @@ static int mkv_query_codec(enum CodecID codec_id, int std_compliance)
return 0;
}
+const AVCodecTag additional_audio_tags[] = {
+ { CODEC_ID_ALAC, 0XFFFFFFFF },
+ { CODEC_ID_EAC3, 0XFFFFFFFF },
+ { CODEC_ID_MLP, 0xFFFFFFFF },
+ { CODEC_ID_PCM_S16BE, 0xFFFFFFFF },
+ { CODEC_ID_PCM_S24BE, 0xFFFFFFFF },
+ { CODEC_ID_PCM_S32BE, 0xFFFFFFFF },
+ { CODEC_ID_QDM2, 0xFFFFFFFF },
+ { CODEC_ID_RA_144, 0xFFFFFFFF },
+ { CODEC_ID_RA_288, 0xFFFFFFFF },
+ { CODEC_ID_COOK, 0xFFFFFFFF },
+ { CODEC_ID_TRUEHD, 0xFFFFFFFF },
+ { CODEC_ID_TTA, 0xFFFFFFFF },
+ { CODEC_ID_WAVPACK, 0xFFFFFFFF },
+ { CODEC_ID_NONE, 0xFFFFFFFF }
+};
+
+const AVCodecTag additional_video_tags[] = {
+ { CODEC_ID_PRORES, 0xFFFFFFFF },
+ { CODEC_ID_RV10, 0xFFFFFFFF },
+ { CODEC_ID_RV20, 0xFFFFFFFF },
+ { CODEC_ID_RV30, 0xFFFFFFFF },
+ { CODEC_ID_RV40, 0xFFFFFFFF },
+ { CODEC_ID_NONE, 0xFFFFFFFF }
+};
+
#if CONFIG_MATROSKA_MUXER
AVOutputFormat ff_matroska_muxer = {
.name = "matroska",
@@ -1316,6 +1342,10 @@ AVOutputFormat ff_matroska_muxer = {
.write_packet = mkv_write_packet,
.write_trailer = mkv_write_trailer,
.flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS,
+ .codec_tag = (const AVCodecTag* const []){
+ ff_codec_bmp_tags, ff_codec_wav_tags,
+ additional_audio_tags, additional_video_tags, 0
+ },
.subtitle_codec = CODEC_ID_SSA,
.query_codec = mkv_query_codec,
};
@@ -1354,5 +1384,8 @@ AVOutputFormat ff_matroska_audio_muxer = {
.write_packet = mkv_write_packet,
.write_trailer = mkv_write_trailer,
.flags = AVFMT_GLOBALHEADER,
+ .codec_tag = (const AVCodecTag* const []){
+ ff_codec_wav_tags, additional_audio_tags, 0
+ },
};
#endif