Browse code

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>

Alex Converse authored on 2012/05/23 06:43:28
Showing 1 changed files
... ...
@@ -487,6 +487,7 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id)
487 487
             return NULL;
488 488
 
489 489
         ac->oc[1].m4ac.chan_config = 2;
490
+        ac->oc[1].m4ac.ps = 0;
490 491
     }
491 492
     // And vice-versa
492 493
     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)
504 504
             return NULL;
505 505
 
506 506
         ac->oc[1].m4ac.chan_config = 1;
507
+        if (ac->oc[1].m4ac.sbr)
508
+            ac->oc[1].m4ac.ps = -1;
507 509
     }
508 510
     // For indexed channel configurations map the channels solely based on position.
509 511
     switch (ac->oc[1].m4ac.chan_config) {