aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-01-21 12:31:58 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-01-21 12:31:58 +0000
commit5ecfa9f5fcc434be7b93b5abacfa336f54cac671 (patch)
treefa07abe9303ff54a8efc238141c79c26cbf1b4b9
parent4fde033a68d46c74308f84d326646c04c4da430b (diff)
downloadffmpeg-5ecfa9f5fcc434be7b93b5abacfa336f54cac671.tar.gz
set codec_tag from codec_id if its not set and can be set based on the AVCodecTag tables
Originally committed as revision 7600 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 7e25478cd3..cebe628d10 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2182,6 +2182,17 @@ int av_write_header(AVFormatContext *s)
}
break;
}
+
+ if(s->oformat->codec_tag){
+ if(st->codec->codec_tag){
+ //FIXME
+ //check that tag + id is in the table
+ //if neither is in the table -> ok
+ //if tag is in the table with another id -> FAIL
+ //if id is in the table with another tag -> FAIL unless strict < ?
+ }else
+ st->codec->codec_tag= av_codec_get_tag(s->oformat->codec_tag, st->codec->codec_id);
+ }
}
if (!s->priv_data && s->oformat->priv_data_size > 0) {