mpeg4videoparse: Use gst_bit_reader_skip to skip more than 32 bits.
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.co.uk>
Tue, 16 Aug 2011 16:47:02 +0000 (19:47 +0300)
committerAlessandro Decina <alessandro.decina@collabora.co.uk>
Tue, 16 Aug 2011 17:05:52 +0000 (19:05 +0200)
GET_BITS is a macro for gst_bit_reader_get_bits_uint32, which cannot
read more than 32 bits and will fail in this case where it is called
to read 79 bits. Since we want to skip those bits, gst_bit_reader_skip
is more appropriate in this case.

gst/mpeg4videoparse/mpeg4parse.c

index 50fd3c7..c00c85a 100644 (file)
@@ -140,7 +140,8 @@ gst_mpeg4_params_parse_vo (MPEG4Params * params, GstBitReader * br)
     GET_BITS (br, 1, &bits);
     if (bits) {
       /* skip vbv_parameters */
-      GET_BITS (br, 79, &bits);
+      if (!gst_bit_reader_skip (br, 79))
+        goto failed;
     }
   }