From 771cbbb17caa1c5799f2ce0acb57ee5c60ed1d1b Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 4 Nov 2011 08:41:00 +0100 Subject: [PATCH] rtpbuffer: Fix compilation issues with gcc 4.6.1 --- gst-libs/gst/rtp/gstrtpbuffer.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gst-libs/gst/rtp/gstrtpbuffer.c b/gst-libs/gst/rtp/gstrtpbuffer.c index 0b1f916a7d..66df84121c 100644 --- a/gst-libs/gst/rtp/gstrtpbuffer.c +++ b/gst-libs/gst/rtp/gstrtpbuffer.c @@ -671,8 +671,9 @@ gst_rtp_buffer_get_extension_data (GstRTPBuffer * rtp, guint16 * bits, *bits = GST_READ_UINT16_BE (pdata); if (wordlen) *wordlen = GST_READ_UINT16_BE (pdata + 2); + pdata += 4; if (data) - *data = pdata + 4; + *data = (gpointer *) pdata; return TRUE; } @@ -1216,13 +1217,13 @@ gst_rtp_buffer_get_extension_twobytes_header (GstRTPBuffer * rtp, guint8 * appbits, guint8 id, guint nth, gpointer * data, guint * size) { guint16 bits; - guint8 *pdata; + guint8 *pdata = NULL; guint wordlen; guint bytelen; gulong offset = 0; guint count = 0; - if (!gst_rtp_buffer_get_extension_data (rtp, &bits, (gpointer) & pdata, + if (!gst_rtp_buffer_get_extension_data (rtp, &bits, (gpointer *) & pdata, &wordlen)) return FALSE; @@ -1333,7 +1334,7 @@ gst_rtp_buffer_add_extension_onebyte_header (GstRTPBuffer * rtp, guint8 id, gpointer data, guint size) { guint16 bits; - guint8 *pdata; + guint8 *pdata = 0; guint wordlen; gboolean has_bit; @@ -1454,7 +1455,7 @@ gst_rtp_buffer_add_extension_twobytes_header (GstRTPBuffer * rtp, guint8 appbits, guint8 id, gpointer data, guint size) { guint16 bits; - guint8 *pdata; + guint8 *pdata = 0; guint wordlen; gboolean has_bit;