comparison mpeg4audio.c @ 11586:2dc5036a8d18 libavcodec

Fix ext_object_type. In the case of explicit non-backwards compible PS, the extension object type should be set to SBR. See 14496-3:2009 (fourth edition).
author alexc
date Thu, 08 Apr 2010 06:04:31 +0000
parents c7ed26e2011f
children d80d54dd267d
comparison
equal deleted inserted replaced
11585:aea1b01ff81b 11586:2dc5036a8d18
89 c->channels = ff_mpeg4audio_channels[c->chan_config]; 89 c->channels = ff_mpeg4audio_channels[c->chan_config];
90 c->sbr = -1; 90 c->sbr = -1;
91 if (c->object_type == AOT_SBR || (c->object_type == AOT_PS && 91 if (c->object_type == AOT_SBR || (c->object_type == AOT_PS &&
92 // check for W6132 Annex YYYY draft MP3onMP4 92 // check for W6132 Annex YYYY draft MP3onMP4
93 !(show_bits(&gb, 3) & 0x03 && !(show_bits(&gb, 9) & 0x3F)))) { 93 !(show_bits(&gb, 3) & 0x03 && !(show_bits(&gb, 9) & 0x3F)))) {
94 c->ext_object_type = c->object_type; 94 c->ext_object_type = AOT_SBR;
95 c->sbr = 1; 95 c->sbr = 1;
96 c->ext_sample_rate = get_sample_rate(&gb, &c->ext_sampling_index); 96 c->ext_sample_rate = get_sample_rate(&gb, &c->ext_sampling_index);
97 c->object_type = get_object_type(&gb); 97 c->object_type = get_object_type(&gb);
98 if (c->object_type == AOT_ER_BSAC) 98 if (c->object_type == AOT_ER_BSAC)
99 c->ext_chan_config = get_bits(&gb, 4); 99 c->ext_chan_config = get_bits(&gb, 4);