diff options
author | Julien Moutte <julien@moutte.net> | 2005-12-11 22:26:08 +0000 |
---|---|---|
committer | Julien Moutte <julien@moutte.net> | 2005-12-11 22:26:08 +0000 |
commit | f77a290549bfe71c759ef6219a0fb23f4110ebf9 (patch) | |
tree | 1b7b19a85df8a082a6e78f4b9fc4d4ea015f8346 /sys | |
parent | d6b4919ac1d982fd3d3a4bf9d6f0c94a630904f0 (diff) |
sys/xvimage/xvimagesink.c: Fixed a leak of the current image reference when cleaning up.
Original commit message from CVS:
2005-12-11 Julien MOUTTE <julien@moutte.net>
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_change_state):
Fixed a leak of the current image reference when cleaning up.
Thanks to Arwed von Merkatz (alley_cat) for pointing it out.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/xvimage/xvimagesink.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 92ab68c2..fb99da31 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -1703,11 +1703,14 @@ gst_xvimagesink_change_state (GstElement * element, GstStateChange transition) break; case GST_STATE_CHANGE_READY_TO_NULL: xvimagesink->running = FALSE; + if (xvimagesink->cur_image) { + gst_buffer_unref (xvimagesink->cur_image); + xvimagesink->cur_image = NULL; + } if (xvimagesink->xvimage) { - gst_xvimage_buffer_free (xvimagesink->xvimage); + gst_buffer_unref (xvimagesink->xvimage); xvimagesink->xvimage = NULL; } - if (xvimagesink->image_pool) gst_xvimagesink_imagepool_clear (xvimagesink); |