Commit e37919f9 authored by Wim Taymans's avatar Wim Taymans
Browse files

Fixed a leak.

Original commit message from CVS:
Fixed a leak.
parent d518b7e8
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment