changeset 11589:fa81ba4670ea libavcodec

Print an error and skip PS when PS is found but explicitly found but signaled to be absent.
author alexc
date Thu, 08 Apr 2010 06:27:35 +0000
parents 480a999ce2c4
children feb045e189bf
files aacsbr.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/aacsbr.c	Thu Apr 08 06:04:41 2010 +0000
+++ b/aacsbr.c	Thu Apr 08 06:27:35 2010 +0000
@@ -897,6 +897,11 @@
 //TODO - implement ps_data for parametric stereo parsing
     switch (bs_extension_id) {
     case EXTENSION_ID_PS:
+        if (!ac->m4ac.ps) {
+            av_log(ac->avccontext, 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 0
         *num_bits_left -= ff_ps_data(gb, ps);
 #else
@@ -904,6 +909,7 @@
         skip_bits_long(gb, *num_bits_left); // bs_fill_bits
         *num_bits_left = 0;
 #endif
+        }
         break;
     default:
         av_log_missing_feature(ac->avccontext, "Reserved SBR extensions are", 1);