mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
bytereader, bytewriter: fix up inline functions to make g++ happy
gstbytereader.h: In function ‘guint8* gst_byte_reader_dup_data_unchecked(GstByteReader*, guint)’: gstbytereader.h:249:75: error: invalid conversion from ‘void*’ to ‘guint8*’ gstbytewriter.h: In function ‘gboolean _gst_byte_writer_ensure_free_space_inline(GstByteWriter*, guint)’: gstbytewriter.h:196:75: error: invalid conversion from ‘void*’ to ‘guint8*’ https://bugzilla.gnome.org/show_bug.cgi?id=645595
This commit is contained in:
parent
2f0dab0f44
commit
5300a5e73b
2 changed files with 4 additions and 3 deletions
|
@ -246,7 +246,8 @@ gst_byte_reader_get_data_unchecked (GstByteReader * reader, guint size)
|
|||
static inline guint8 *
|
||||
gst_byte_reader_dup_data_unchecked (GstByteReader * reader, guint size)
|
||||
{
|
||||
return g_memdup (gst_byte_reader_get_data_unchecked (reader, size), size);
|
||||
gconstpointer data = gst_byte_reader_get_data_unchecked (reader, size);
|
||||
return (guint8 *) g_memdup (data, size);
|
||||
}
|
||||
|
||||
/* Unchecked variants that should not be used */
|
||||
|
|
|
@ -183,7 +183,7 @@ _gst_byte_writer_next_pow2 (guint n)
|
|||
static inline gboolean
|
||||
_gst_byte_writer_ensure_free_space_inline (GstByteWriter * writer, guint size)
|
||||
{
|
||||
guint8 *data;
|
||||
gpointer data;
|
||||
|
||||
if (G_LIKELY (size <= writer->alloc_size - writer->parent.byte))
|
||||
return TRUE;
|
||||
|
@ -197,7 +197,7 @@ _gst_byte_writer_ensure_free_space_inline (GstByteWriter * writer, guint size)
|
|||
if (G_UNLIKELY (data == NULL))
|
||||
return FALSE;
|
||||
|
||||
writer->parent.data = data;
|
||||
writer->parent.data = (guint8 *) data;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue