aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aacsbr.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-23 00:47:38 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-07 19:50:31 +0100
commit60dbf2eff92f8aa4683b6dcaba9e694890258ade (patch)
treed1fc5a3c3cfc8f139f45bdf6f0a4ad09965fe30c /libavcodec/aacsbr.c
parentfee5da6b0a79bed9dc849f216b6da1e03132b668 (diff)
downloadffmpeg-60dbf2eff92f8aa4683b6dcaba9e694890258ade.tar.gz
aacdec: Reconfigure output as needed, disable pop_output_configuration()
Fixes Ticket1694 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aacsbr.c')
-rw-r--r--libavcodec/aacsbr.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c
index 1820f80443..81b3c78ae3 100644
--- a/libavcodec/aacsbr.c
+++ b/libavcodec/aacsbr.c
@@ -925,11 +925,13 @@ static void read_sbr_extension(AACContext *ac, SpectralBandReplication *sbr,
{
switch (bs_extension_id) {
case EXTENSION_ID_PS:
- if (!ac->oc[1].m4ac.ps) {
- av_log(ac->avctx, AV_LOG_ERROR, "Parametric Stereo signaled to be not-present but was found in the bitstream.\n");
- skip_bits_long(gb, *num_bits_left); // bs_fill_bits
- *num_bits_left = 0;
- } else {
+ if (ac->oc[1].m4ac.ps != 1) {
+ av_log(ac->avctx, AV_LOG_DEBUG, "Parametric Stereo was found in the bitstream.\n");
+ ac->oc[1].m4ac.ps = 1;
+ ff_aac_output_configure(ac, ac->oc[1].layout_map, ac->oc[1].layout_map_tags,
+ ac->oc[1].status, 1);
+ }
+ av_assert0(ac->oc[1].m4ac.ps);
#if 1
*num_bits_left -= ff_ps_read_data(ac->avctx, gb, &sbr->ps, *num_bits_left);
#else
@@ -937,7 +939,6 @@ static void read_sbr_extension(AACContext *ac, SpectralBandReplication *sbr,
skip_bits_long(gb, *num_bits_left); // bs_fill_bits
*num_bits_left = 0;
#endif
- }
break;
default:
// some files contain 0-padding