comparison mpeg4audio.c @ 10518:d7ac0d3ddd95 libavcodec

Add a channels field to MPEG4AudioConfig.
author alexc
date Wed, 11 Nov 2009 20:24:23 +0000
parents 41796cdda927
children 33890a382b36
comparison
equal deleted inserted replaced
10517:5317dff91b48 10518:d7ac0d3ddd95
55 55
56 init_get_bits(&gb, buf, buf_size*8); 56 init_get_bits(&gb, buf, buf_size*8);
57 c->object_type = get_object_type(&gb); 57 c->object_type = get_object_type(&gb);
58 c->sample_rate = get_sample_rate(&gb, &c->sampling_index); 58 c->sample_rate = get_sample_rate(&gb, &c->sampling_index);
59 c->chan_config = get_bits(&gb, 4); 59 c->chan_config = get_bits(&gb, 4);
60 if (c->chan_config < FF_ARRAY_ELEMS(ff_mpeg4audio_channels))
61 c->channels = ff_mpeg4audio_channels[c->chan_config];
60 c->sbr = -1; 62 c->sbr = -1;
61 if (c->object_type == AOT_SBR) { 63 if (c->object_type == AOT_SBR) {
62 c->ext_object_type = c->object_type; 64 c->ext_object_type = c->object_type;
63 c->sbr = 1; 65 c->sbr = 1;
64 c->ext_sample_rate = get_sample_rate(&gb, &c->ext_sampling_index); 66 c->ext_sample_rate = get_sample_rate(&gb, &c->ext_sampling_index);