Fixed a leak.

Original commit message from CVS:
Fixed a leak.
This commit is contained in:
Wim Taymans 2001-10-14 12:14:44 +00:00
parent d518b7e859
commit e37919f916
2 changed files with 8 additions and 14 deletions

View file

@ -749,18 +749,15 @@ gst_fakesrc_change_state (GstElement *element)
fakesrc = GST_FAKESRC (element);
if (GST_STATE_PENDING (element) == GST_STATE_NULL) {
if (GST_STATE_PENDING (element) == GST_STATE_READY) {
fakesrc->buffer_count = 0;
fakesrc->pattern_byte = 0x00;
fakesrc->need_flush = FALSE;
if (fakesrc->parent) {
gst_buffer_unref (fakesrc->parent);
fakesrc->parent = NULL;
}
}
else if (GST_STATE_PENDING (element) == GST_STATE_READY) {
fakesrc->buffer_count = 0;
fakesrc->pattern_byte = 0x00;
fakesrc->need_flush = FALSE;
fakesrc->parent = NULL;
}
if (GST_ELEMENT_CLASS (parent_class)->change_state)
return GST_ELEMENT_CLASS (parent_class)->change_state (element);

View file

@ -749,18 +749,15 @@ gst_fakesrc_change_state (GstElement *element)
fakesrc = GST_FAKESRC (element);
if (GST_STATE_PENDING (element) == GST_STATE_NULL) {
if (GST_STATE_PENDING (element) == GST_STATE_READY) {
fakesrc->buffer_count = 0;
fakesrc->pattern_byte = 0x00;
fakesrc->need_flush = FALSE;
if (fakesrc->parent) {
gst_buffer_unref (fakesrc->parent);
fakesrc->parent = NULL;
}
}
else if (GST_STATE_PENDING (element) == GST_STATE_READY) {
fakesrc->buffer_count = 0;
fakesrc->pattern_byte = 0x00;
fakesrc->need_flush = FALSE;
fakesrc->parent = NULL;
}
if (GST_ELEMENT_CLASS (parent_class)->change_state)
return GST_ELEMENT_CLASS (parent_class)->change_state (element);