bitwriter: Fix inclusion of header in C++ code
authorSebastian Dröge <sebastian@centricular.com>
Tue, 23 Apr 2019 15:00:59 +0000 (18:00 +0300)
committerSebastian Dröge <slomo@coaxion.net>
Tue, 23 Apr 2019 15:15:56 +0000 (15:15 +0000)
../subprojects/gstreamer/libs/gst/base/gstbitwriter.h: In function 'gboolean _gst_bit_writer_check_remaining(GstBitWriter*, guint32)':
../subprojects/gstreamer/libs/gst/base/gstbitwriter.h:161:31: error: invalid conversion from 'gpointer' {aka 'void*'} to 'guint8*' {aka 'unsigned char*'} [-fpermissive]
   bitwriter->data = g_realloc (bitwriter->data, (new_bit_size >> 3));
                     ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

libs/gst/base/gstbitwriter.h

index 5cffbba..8a860e8 100644 (file)
@@ -160,7 +160,7 @@ _gst_bit_writer_check_remaining (GstBitWriter * bitwriter, guint32 bits)
   g_assert (new_bit_size
       && ((new_bit_size & __GST_BITS_WRITER_ALIGNMENT_MASK) == 0));
   clear_pos = ((bitwriter->bit_size + 7) >> 3);
-  bitwriter->data = g_realloc (bitwriter->data, (new_bit_size >> 3));
+  bitwriter->data = (guint8 *) g_realloc (bitwriter->data, (new_bit_size >> 3));
   memset (bitwriter->data + clear_pos, 0, (new_bit_size >> 3) - clear_pos);
   bitwriter->bit_capacity = new_bit_size;
   return TRUE;