summaryrefslogtreecommitdiffstats
path: root/gst/librfb/rfbdecoder.c
diff options
context:
space:
mode:
authorThijs Vermeir <thijsvermeir@gmail.com>2007-09-21 10:27:02 +0000
committerThijs Vermeir <thijsvermeir@gmail.com>2007-09-21 10:27:02 +0000
commitab4038ce2e51ed2eddd3306b77a3e1b560aa5d03 (patch)
treea84e16f6295ca88f6da10cbb90960dae9a02fa03 /gst/librfb/rfbdecoder.c
parent27230cfead5e704d526b0ac164c35b3471f65d6f (diff)
downloadgst-plugins-bad-ab4038ce2e51ed2eddd3306b77a3e1b560aa5d03.tar.gz
gst-plugins-bad-ab4038ce2e51ed2eddd3306b77a3e1b560aa5d03.tar.bz2
gst-plugins-bad-ab4038ce2e51ed2eddd3306b77a3e1b560aa5d03.zip
gst/librfb/gstrfbsrc.c: Minimum raw encoding is working now
Original commit message from CVS: * gst/librfb/gstrfbsrc.c: Minimum raw encoding is working now * gst/librfb/rfbdecoder.c: fix address while reading from stream
Diffstat (limited to 'gst/librfb/rfbdecoder.c')
-rw-r--r--gst/librfb/rfbdecoder.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gst/librfb/rfbdecoder.c b/gst/librfb/rfbdecoder.c
index 8c398bec..3d150dbe 100644
--- a/gst/librfb/rfbdecoder.c
+++ b/gst/librfb/rfbdecoder.c
@@ -148,10 +148,10 @@ rfb_decoder_iterate (RfbDecoder * decoder)
}
guint8 *
-rfb_decoder_read (RfbDecoder * decoder, gint len)
+rfb_decoder_read (RfbDecoder * decoder, guint32 len)
{
- gint total = 0;
- gint now = 0;
+ guint32 total = 0;
+ guint32 now = 0;
guint8 *address = NULL;
g_return_val_if_fail (decoder->fd > 0, NULL);
@@ -160,9 +160,8 @@ rfb_decoder_read (RfbDecoder * decoder, gint len)
address = g_malloc (len);
g_return_val_if_fail (address, NULL);
- address += total;
while (total < len) {
- now = recv (decoder->fd, address, len - total, 0);
+ now = recv (decoder->fd, address + total, len - total, 0);
if (now <= 0) {
GST_WARNING ("rfb read error on socket");
return NULL;