rfbdecoder: don't free decoder data

The decoder data is freed when we read more data.
This commit is contained in:
Wim Taymans 2018-08-16 11:20:54 +02:00
parent dad8f75f87
commit e098ad4918

View file

@ -983,7 +983,6 @@ rfb_decoder_corre_encoding (RfbDecoder * decoder, gint start_x, gint start_y,
number_of_rectangles = RFB_GET_UINT32 (decoder->data); number_of_rectangles = RFB_GET_UINT32 (decoder->data);
color = GUINT32_SWAP_LE_BE ((RFB_GET_UINT32 (decoder->data + 4))); color = GUINT32_SWAP_LE_BE ((RFB_GET_UINT32 (decoder->data + 4)));
g_free (decoder->data);
GST_DEBUG ("number of rectangles :%d", number_of_rectangles); GST_DEBUG ("number of rectangles :%d", number_of_rectangles);
@ -1003,8 +1002,6 @@ rfb_decoder_corre_encoding (RfbDecoder * decoder, gint start_x, gint start_y,
/* draw the rectangle in the foreground */ /* draw the rectangle in the foreground */
rfb_decoder_fill_rectangle (decoder, start_x + x, start_y + y, w, h, color); rfb_decoder_fill_rectangle (decoder, start_x + x, start_y + y, w, h, color);
g_free (decoder->data);
} }
return TRUE; return TRUE;