aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aacdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-17 17:42:47 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-17 18:11:41 +0100
commit5a2b3f3a52070232a68582a502fb60a9226ca86a (patch)
treee4199b245208326a22aec2567ed4328eaa9885fb /libavcodec/aacdec.c
parent1dbd433f0dce3440f8b7bf315c50e1420dd7ce89 (diff)
downloadffmpeg-5a2b3f3a52070232a68582a502fb60a9226ca86a.tar.gz
aacdec: Avoid unneeded reinit due to ADTS headers
Fixes Ticket 662 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aacdec.c')
-rw-r--r--libavcodec/aacdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index 117cd587ee..2166928294 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -2081,7 +2081,7 @@ static int parse_adts_frame_header(AACContext *ac, GetBitContext *gb)
size = avpriv_aac_parse_header(gb, &hdr_info);
if (size > 0) {
- if (hdr_info.chan_config) {
+ if (hdr_info.chan_config && (hdr_info.chan_config!=ac->m4ac.chan_config || ac->m4ac.sample_rate!=hdr_info.sample_rate)) {
enum ChannelPosition new_che_pos[4][MAX_ELEM_ID];
memset(new_che_pos, 0, 4 * MAX_ELEM_ID * sizeof(new_che_pos[0][0]));
ac->m4ac.chan_config = hdr_info.chan_config;