summaryrefslogtreecommitdiffstats
path: root/gst/librfb/rfbdecoder.c
diff options
context:
space:
mode:
authorJens Granseuer <jensgr@gmx.net>2008-02-22 05:33:59 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-02-22 05:33:59 +0000
commit266e4741cd2c5ddde52fc9d4a7062abd87263da9 (patch)
tree1f74b9b6e0a5876fc014f863dbcbbf3ab59b758e /gst/librfb/rfbdecoder.c
parent6c322640d53093d0e34961ef8cbaeaac1290ae21 (diff)
downloadgst-plugins-bad-266e4741cd2c5ddde52fc9d4a7062abd87263da9.tar.gz
gst-plugins-bad-266e4741cd2c5ddde52fc9d4a7062abd87263da9.tar.bz2
gst-plugins-bad-266e4741cd2c5ddde52fc9d4a7062abd87263da9.zip
Some C89 fixes, moving variable declarations to the beginning of a block. Fixes bug #517937.
Original commit message from CVS: Patch by: Jens Granseuer <jensgr at gmx dot net> * gst/librfb/gstrfbsrc.c: (gst_rfb_property_set_version): * gst/librfb/rfbdecoder.c: (rfb_decoder_message_set_encodings), (rfb_decoder_state_set_encodings): * gst/mpegtsparse/mpegtspacketizer.c: (mpegts_packetizer_parse_nit), (mpegts_packetizer_parse_sdt), (mpegts_packetizer_parse_eit): * sys/fbdev/gstfbdevsink.c: (gst_fbdevsink_getcaps), (gst_fbdevsink_setcaps), (gst_fbdevsink_render): Some C89 fixes, moving variable declarations to the beginning of a block. Fixes bug #517937.
Diffstat (limited to 'gst/librfb/rfbdecoder.c')
-rw-r--r--gst/librfb/rfbdecoder.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gst/librfb/rfbdecoder.c b/gst/librfb/rfbdecoder.c
index 009e291b..0bc1fb2d 100644
--- a/gst/librfb/rfbdecoder.c
+++ b/gst/librfb/rfbdecoder.c
@@ -406,12 +406,13 @@ rfb_decoder_message_set_encodings (GSList * encodings_list)
{
guint8 *message = g_malloc0 (4 + 4 * g_slist_length (encodings_list));
+ guint32 *encoding_type;
message[0] = 0x02; /* message type */
RFB_SET_UINT16 (message + 2, g_slist_length (encodings_list)); /* number of encodings */
/* write all the encoding types */
- guint32 *encoding_type = (guint32 *) (message + 4);
+ encoding_type = (guint32 *) (message + 4);
while (encodings_list) {
RFB_SET_UINT32 (encoding_type, GPOINTER_TO_UINT (encodings_list->data));
@@ -434,6 +435,7 @@ static gboolean
rfb_decoder_state_set_encodings (RfbDecoder * decoder)
{
GSList *encoder_list = NULL;
+ guint8 *message;
GST_DEBUG ("entered set encodings");
@@ -449,7 +451,7 @@ rfb_decoder_state_set_encodings (RfbDecoder * decoder)
encoder_list =
g_slist_append (encoder_list, GUINT_TO_POINTER (ENCODING_TYPE_RAW));
- guint8 *message = rfb_decoder_message_set_encodings (encoder_list);
+ message = rfb_decoder_message_set_encodings (encoder_list);
rfb_decoder_send (decoder, message, 4 + 4 * g_slist_length (encoder_list));