Mercurial > libavformat.hg
comparison mov.c @ 5362:6f5a1064e48a libavformat
Add a channels field to MPEG4AudioConfig.
author | alexc |
---|---|
date | Wed, 11 Nov 2009 20:24:23 +0000 |
parents | 0f7d0b4f9bd8 |
children | 4a925b59dc1b |
comparison
equal
deleted
inserted
replaced
5361:ce002ddccf1b | 5362:6f5a1064e48a |
---|---|
432 st->codec->extradata_size = len; | 432 st->codec->extradata_size = len; |
433 if (st->codec->codec_id == CODEC_ID_AAC) { | 433 if (st->codec->codec_id == CODEC_ID_AAC) { |
434 MPEG4AudioConfig cfg; | 434 MPEG4AudioConfig cfg; |
435 ff_mpeg4audio_get_config(&cfg, st->codec->extradata, | 435 ff_mpeg4audio_get_config(&cfg, st->codec->extradata, |
436 st->codec->extradata_size); | 436 st->codec->extradata_size); |
437 if (cfg.chan_config > 7) | 437 st->codec->channels = cfg.channels; |
438 return -1; | |
439 st->codec->channels = ff_mpeg4audio_channels[cfg.chan_config]; | |
440 if (cfg.object_type == 29 && cfg.sampling_index < 3) // old mp3on4 | 438 if (cfg.object_type == 29 && cfg.sampling_index < 3) // old mp3on4 |
441 st->codec->sample_rate = ff_mpa_freq_tab[cfg.sampling_index]; | 439 st->codec->sample_rate = ff_mpa_freq_tab[cfg.sampling_index]; |
442 else | 440 else |
443 st->codec->sample_rate = cfg.sample_rate; // ext sample rate ? | 441 st->codec->sample_rate = cfg.sample_rate; // ext sample rate ? |
444 dprintf(fc, "mp4a config channels %d obj %d ext obj %d " | 442 dprintf(fc, "mp4a config channels %d obj %d ext obj %d " |