[FFmpeg-devel] [PATCH] aacsbr: silence message for SBR extension "padding".

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Apr 9 21:21:40 CEST 2012


Some files contain a few additional, all-0 bits.
Check for that case and don't print incorrect "not supported"
message.
Fixes trac issue #836.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
 libavcodec/aacsbr.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c
index 79a0ca2..ea2dcbb 100644
--- a/libavcodec/aacsbr.c
+++ b/libavcodec/aacsbr.c
@@ -933,7 +933,9 @@ static void read_sbr_extension(AACContext *ac, SpectralBandReplication *sbr,
         }
         break;
     default:
-        av_log_missing_feature(ac->avctx, "Reserved SBR extensions are", 1);
+        // some files contain 0-padding
+        if (bs_extension_id || *num_bits_left > 16 || show_bits(gb, *num_bits_left))
+            av_log_missing_feature(ac->avctx, "Reserved SBR extensions are", 1);
         skip_bits_long(gb, *num_bits_left); // bs_fill_bits
         *num_bits_left = 0;
         break;
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list