aacsbr: silence message for SBR extension "padding".
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Mon, 9 Apr 2012 19:19:30 +0000 (21:19 +0200)
committerAlex Converse <alex.converse@gmail.com>
Wed, 4 Feb 2015 04:32:16 +0000 (20:32 -0800)
Some files contain a few additional, all-0 bits.
Check for that case and don't print incorrect "not supported"
message.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Alex Converse <alex.converse@gmail.com>
libavcodec/aacsbr.c

index 52ebe65..3da8a5b 100644 (file)
@@ -929,7 +929,9 @@ static void read_sbr_extension(AACContext *ac, SpectralBandReplication *sbr,
         }
         break;
     default:
-        avpriv_request_sample(ac->avctx, "Reserved SBR extensions");
+        // some files contain 0-padding
+        if (bs_extension_id || *num_bits_left > 16 || show_bits(gb, *num_bits_left))
+            avpriv_request_sample(ac->avctx, "Reserved SBR extensions");
         skip_bits_long(gb, *num_bits_left); // bs_fill_bits
         *num_bits_left = 0;
         break;