comparison mov.c @ 6210:da46dcc05d4a libavformat

Use ext sample from mpeg4audio config if set with AAC SBR
author bcoudurier
date Thu, 01 Jul 2010 22:31:31 +0000
parents d81e41261983
children 6f6ecca6904a
comparison
equal deleted inserted replaced
6209:71862ed5b874 6210:da46dcc05d4a
533 ff_mpeg4audio_get_config(&cfg, st->codec->extradata, 533 ff_mpeg4audio_get_config(&cfg, st->codec->extradata,
534 st->codec->extradata_size); 534 st->codec->extradata_size);
535 st->codec->channels = cfg.channels; 535 st->codec->channels = cfg.channels;
536 if (cfg.object_type == 29 && cfg.sampling_index < 3) // old mp3on4 536 if (cfg.object_type == 29 && cfg.sampling_index < 3) // old mp3on4
537 st->codec->sample_rate = ff_mpa_freq_tab[cfg.sampling_index]; 537 st->codec->sample_rate = ff_mpa_freq_tab[cfg.sampling_index];
538 else if (cfg.ext_sample_rate)
539 st->codec->sample_rate = cfg.ext_sample_rate;
538 else 540 else
539 st->codec->sample_rate = cfg.sample_rate; // ext sample rate ? 541 st->codec->sample_rate = cfg.sample_rate;
540 dprintf(fc, "mp4a config channels %d obj %d ext obj %d " 542 dprintf(fc, "mp4a config channels %d obj %d ext obj %d "
541 "sample rate %d ext sample rate %d\n", st->codec->channels, 543 "sample rate %d ext sample rate %d\n", st->codec->channels,
542 cfg.object_type, cfg.ext_object_type, 544 cfg.object_type, cfg.ext_object_type,
543 cfg.sample_rate, cfg.ext_sample_rate); 545 cfg.sample_rate, cfg.ext_sample_rate);
544 if (!(st->codec->codec_id = ff_codec_get_id(mp4_audio_types, 546 if (!(st->codec->codec_id = ff_codec_get_id(mp4_audio_types,