diff options
author | Alex Converse <alex.converse@gmail.com> | 2012-05-22 14:43:28 -0700 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-06-07 00:55:26 +0200 |
commit | f9fc08de658bd06278a77636a1a5d2c9fbe7d277 (patch) | |
tree | b4862390bf1ea4bcee8c4cb6e790c976c69c092c | |
parent | 31d3b3b5d5f48c48ba96b6565b6bcc59e9272879 (diff) | |
download | ffmpeg-f9fc08de658bd06278a77636a1a5d2c9fbe7d277.tar.gz |
aacdec: Turn PS off when switching to stereo and turn it to implicit when switching to mono.
(cherry picked from commit 79c8e29a7e404dbcf670df599fad6894f98ccab2)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/aacdec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index d4f48bb791..3118ee7a0e 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -487,6 +487,7 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id) return NULL; ac->oc[1].m4ac.chan_config = 2; + ac->oc[1].m4ac.ps = 0; } // And vice-versa if (!ac->tags_mapped && type == TYPE_SCE && ac->oc[1].m4ac.chan_config == 2) { @@ -504,6 +505,8 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id) return NULL; ac->oc[1].m4ac.chan_config = 1; + if (ac->oc[1].m4ac.sbr) + ac->oc[1].m4ac.ps = -1; } // For indexed channel configurations map the channels solely based on position. switch (ac->oc[1].m4ac.chan_config) { |