aacparse: fix varlength number reading as per spec
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Mon, 5 Sep 2016 08:35:53 +0000 (09:35 +0100)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Tue, 6 Sep 2016 14:09:21 +0000 (15:09 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=769278

gst/audioparsers/gstaacparse.c

index 021de09..1b4c789 100644 (file)
@@ -481,7 +481,7 @@ gst_aac_parse_latm_get_value (GstAacParse * aacparse, GstBitReader * br,
   *value = 0;
   if (!gst_bit_reader_get_bits_uint8 (br, &bytes, 2))
     return FALSE;
-  for (i = 0; i < bytes; ++i) {
+  for (i = 0; i <= bytes; ++i) {
     *value <<= 8;
     if (!gst_bit_reader_get_bits_uint8 (br, &byte, 8))
       return FALSE;