# HG changeset patch # User alexc # Date 1243373696 0 # Node ID d45e44454d138e98ad428fb210a2030a79df4714 # Parent 997d2de9cd840a0bbb1388ed326bb4d8337b1bc5 In the event of a mismatch, do not follow the sample rate index in an AAC PCE. This matches the behavior the reference decoder and fixes issue 1072. diff -r 997d2de9cd84 -r d45e44454d13 aac.c --- a/aac.c Tue May 26 17:04:28 2009 +0000 +++ b/aac.c Tue May 26 21:34:56 2009 +0000 @@ -231,12 +231,9 @@ skip_bits(gb, 2); // object_type sampling_index = get_bits(gb, 4); - if(sampling_index > 12) { - av_log(ac->avccontext, AV_LOG_ERROR, "invalid sampling rate index %d\n", ac->m4ac.sampling_index); - return -1; - } - ac->m4ac.sampling_index = sampling_index; - ac->m4ac.sample_rate = ff_mpeg4audio_sample_rates[ac->m4ac.sampling_index]; + if (ac->m4ac.sampling_index != sampling_index) + av_log(ac->avccontext, AV_LOG_WARNING, "Sample rate index in program config element does not match the sample rate index configured by the container.\n"); + num_front = get_bits(gb, 4); num_side = get_bits(gb, 4); num_back = get_bits(gb, 4);