summaryrefslogtreecommitdiff
path: root/gst/vmnc
diff options
context:
space:
mode:
authorEdward Hervey <edward@collabora.com>2014-05-13 11:38:44 +0200
committerEdward Hervey <edward@collabora.com>2014-05-13 11:38:44 +0200
commit93ef3f9b24b7f5d779592c523cec97fa1829a031 (patch)
tree2a608276315d98d6056392d72faff74b5fc96ccc /gst/vmnc
parentbc918d1466a80659fb694a62556d7478906f262d (diff)
vmndec: Don't leak output state
_set_output_state returns a reference to the codec state. CID #1212170
Diffstat (limited to 'gst/vmnc')
-rw-r--r--gst/vmnc/vmncdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/vmnc/vmncdec.c b/gst/vmnc/vmncdec.c
index 8e0830ecc..6d33bdd11 100644
--- a/gst/vmnc/vmncdec.c
+++ b/gst/vmnc/vmncdec.c
@@ -156,6 +156,7 @@ vmnc_handle_wmvi_rectangle (GstVMncDec * dec, struct RfbRectangle *rect,
gint bpp, tc;
guint32 redmask, greenmask, bluemask;
guint32 endianness, dataendianness;
+ GstVideoCodecState *state;
/* A WMVi rectangle has a 16byte payload */
if (len < 16) {
@@ -249,8 +250,9 @@ vmnc_handle_wmvi_rectangle (GstVMncDec * dec, struct RfbRectangle *rect,
}
- gst_video_decoder_set_output_state (GST_VIDEO_DECODER (dec), format,
+ state = gst_video_decoder_set_output_state (GST_VIDEO_DECODER (dec), format,
rect->width, rect->height, dec->input_state);
+ gst_video_codec_state_unref (state);
g_free (dec->imagedata);
dec->imagedata = g_malloc (dec->format.width * dec->format.height *