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.
This commit is contained in:
Julien Moutte 2005-12-11 22:26:08 +00:00
parent d6b4919ac1
commit f77a290549
3 changed files with 12 additions and 3 deletions

View file

@ -1,3 +1,9 @@
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.
2005-12-09 Michael Smith <msmith@fluendo.com>
* tools/Makefile.am:

2
common

@ -1 +1 @@
Subproject commit fe94837afc0b10eaf867156fc29eea0073ba45df
Subproject commit 4edc214072fe07d2aade96bc336493425654d7b4

View file

@ -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);