mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 13:21:28 +00:00
Fixed a leak.
Original commit message from CVS: Fixed a leak.
This commit is contained in:
parent
d518b7e859
commit
e37919f916
2 changed files with 8 additions and 14 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue