comparison utils.c @ 1681:23c911d09382 libavformat

set codec_tag from codec_id if its not set and can be set based on the AVCodecTag tables
author michael
date Sun, 21 Jan 2007 12:31:58 +0000
parents b8656dd86312
children 02b8757d2e72
comparison
equal deleted inserted replaced
1680:9240521ca4fd 1681:23c911d09382
2180 av_log(s, AV_LOG_ERROR, "dimensions not set\n"); 2180 av_log(s, AV_LOG_ERROR, "dimensions not set\n");
2181 return -1; 2181 return -1;
2182 } 2182 }
2183 break; 2183 break;
2184 } 2184 }
2185
2186 if(s->oformat->codec_tag){
2187 if(st->codec->codec_tag){
2188 //FIXME
2189 //check that tag + id is in the table
2190 //if neither is in the table -> ok
2191 //if tag is in the table with another id -> FAIL
2192 //if id is in the table with another tag -> FAIL unless strict < ?
2193 }else
2194 st->codec->codec_tag= av_codec_get_tag(s->oformat->codec_tag, st->codec->codec_id);
2195 }
2185 } 2196 }
2186 2197
2187 if (!s->priv_data && s->oformat->priv_data_size > 0) { 2198 if (!s->priv_data && s->oformat->priv_data_size > 0) {
2188 s->priv_data = av_mallocz(s->oformat->priv_data_size); 2199 s->priv_data = av_mallocz(s->oformat->priv_data_size);
2189 if (!s->priv_data) 2200 if (!s->priv_data)