diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-08-23 06:35:30 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-23 14:43:12 +0200 |
commit | 599a4e07711b4a950bf13de707cfd011d90ad5a5 (patch) | |
tree | 062621993bd1031e73484d6fecf3896ba8f11856 /libavcodec/mpeg4audio.c | |
parent | 104f42e69485557a7d603047e1d29c44bbd12562 (diff) | |
download | ffmpeg-599a4e07711b4a950bf13de707cfd011d90ad5a5.tar.gz |
mpeg4audio: dont take the SBR flag too serious.
Fixes Ticket1049
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg4audio.c')
-rw-r--r-- | libavcodec/mpeg4audio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/mpeg4audio.c b/libavcodec/mpeg4audio.c index abd3fa4a9b..3066954286 100644 --- a/libavcodec/mpeg4audio.c +++ b/libavcodec/mpeg4audio.c @@ -126,8 +126,11 @@ int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, if (show_bits(&gb, 11) == 0x2b7) { // sync extension get_bits(&gb, 11); c->ext_object_type = get_object_type(&gb); - if (c->ext_object_type == AOT_SBR && (c->sbr = get_bits1(&gb)) == 1) + if (c->ext_object_type == AOT_SBR && (c->sbr = get_bits1(&gb)) == 1) { c->ext_sample_rate = get_sample_rate(&gb, &c->ext_sampling_index); + if (c->ext_sample_rate == c->sample_rate) + c->sbr = -1; + } if (get_bits_left(&gb) > 11 && get_bits(&gb, 11) == 0x548) c->ps = get_bits1(&gb); break; |