1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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
This commit is contained in:
Michael Niedermayer 2007-01-21 12:31:58 +00:00
parent 4fde033a68
commit 5ecfa9f5fc

View File

@ -2182,6 +2182,17 @@ int av_write_header(AVFormatContext *s)
} }
break; 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) { if (!s->priv_data && s->oformat->priv_data_size > 0) {