+ if (tmp_codec >= 0) {
+ tmp_codec = ff_codec_get_id(ff_voc_codec_tags, tmp_codec);
+ if (dec->codec_id == CODEC_ID_NONE)
+ dec->codec_id = tmp_codec;
+ else if (dec->codec_id != tmp_codec)
+ av_log(s, AV_LOG_WARNING, "Ignoring mid-stream change in audio codec\n");
+ if (dec->codec_id == CODEC_ID_NONE) {
+ if (s->audio_codec_id == CODEC_ID_NONE) {
+ av_log(s, AV_LOG_ERROR, "unknown codec tag\n");
+ return AVERROR(EINVAL);
+ }
+ av_log(s, AV_LOG_WARNING, "unknown codec tag\n");
+ }
+ }
+
+ dec->bit_rate = dec->sample_rate * dec->bits_per_coded_sample;