aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2010-04-08 06:27:35 +0000
committerAlex Converse <alex.converse@gmail.com>2010-04-08 06:27:35 +0000
commit73c2704608757b1110972f02547fa9635b8a586a (patch)
tree4470b20fd7485362afe1794d116c90cd5304dceb
parentd14662f66a4a9cfd1eadfa3b88e0be93e67d6524 (diff)
downloadffmpeg-73c2704608757b1110972f02547fa9635b8a586a.tar.gz
Print an error and skip PS when PS is found but explicitly found but
signaled to be absent. Originally committed as revision 22819 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/aacsbr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c
index b7734f4f44..15857d3658 100644
--- a/libavcodec/aacsbr.c
+++ b/libavcodec/aacsbr.c
@@ -897,6 +897,11 @@ static void read_sbr_extension(AACContext *ac, SpectralBandReplication *sbr,
//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 @@ 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:
av_log_missing_feature(ac->avccontext, "Reserved SBR extensions are", 1);