summaryrefslogtreecommitdiff
path: root/libavcodec/aac.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2009-05-26 21:34:56 +0000
committerAlex Converse <alex.converse@gmail.com>2009-05-26 21:34:56 +0000
commit401a99508516b62eb4135360bf3d969ccb3c323d (patch)
tree499b9c97518ad92510c052cb1257206cbd8adac3 /libavcodec/aac.c
parente9859317eb3d69a02efc4d1d472ef97e1802cae1 (diff)
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. Originally committed as revision 18957 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aac.c')
-rw-r--r--libavcodec/aac.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libavcodec/aac.c b/libavcodec/aac.c
index 25c74b8157..50429cf0ff 100644
--- a/libavcodec/aac.c
+++ b/libavcodec/aac.c
@@ -231,12 +231,9 @@ static int decode_pce(AACContext * ac, enum ChannelPosition new_che_pos[4][MAX_E
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);