mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-12 06:42:00 +00:00
plugins/elements/gsttypefindelement.c: Don't leak found caps in chain function (no idea why that never showed up as a...
Original commit message from CVS: * plugins/elements/gsttypefindelement.c: (gst_type_find_element_chain_do_typefinding), (gst_type_find_element_change_state): Don't leak found caps in chain function (no idea why that never showed up as a leak anywhere).
This commit is contained in:
parent
8dd745a6b2
commit
bd5338ff31
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2007-01-30 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* plugins/elements/gsttypefindelement.c:
|
||||||
|
(gst_type_find_element_chain_do_typefinding),
|
||||||
|
(gst_type_find_element_change_state):
|
||||||
|
Don't leak found caps in chain function (no idea why that never
|
||||||
|
showed up as a leak anywhere).
|
||||||
|
|
||||||
2007-01-30 Stefan Kost <ensonic@users.sf.net>
|
2007-01-30 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* gst/gstplugin.h:
|
* gst/gstplugin.h:
|
||||||
|
|
|
@ -620,6 +620,8 @@ gst_type_find_element_chain_do_typefinding (GstTypeFindElement * typefind)
|
||||||
"probability is %u which is lower than the required minimum of %u",
|
"probability is %u which is lower than the required minimum of %u",
|
||||||
caps, probability, typefind->min_probability);
|
caps, probability, typefind->min_probability);
|
||||||
|
|
||||||
|
gst_caps_replace (&caps, NULL);
|
||||||
|
|
||||||
if (GST_BUFFER_SIZE (typefind->store) >= TYPE_FIND_MAX_SIZE) {
|
if (GST_BUFFER_SIZE (typefind->store) >= TYPE_FIND_MAX_SIZE) {
|
||||||
GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND, (NULL), (NULL));
|
GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND, (NULL), (NULL));
|
||||||
stop_typefinding (typefind);
|
stop_typefinding (typefind);
|
||||||
|
@ -636,6 +638,7 @@ gst_type_find_element_chain_do_typefinding (GstTypeFindElement * typefind)
|
||||||
|
|
||||||
/* .. and send out the accumulated data */
|
/* .. and send out the accumulated data */
|
||||||
stop_typefinding (typefind);
|
stop_typefinding (typefind);
|
||||||
|
gst_caps_unref (caps);
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -768,6 +771,7 @@ gst_type_find_element_change_state (GstElement * element,
|
||||||
|
|
||||||
switch (transition) {
|
switch (transition) {
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||||
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||||
gst_caps_replace (&typefind->caps, NULL);
|
gst_caps_replace (&typefind->caps, NULL);
|
||||||
g_list_foreach (typefind->cached_events,
|
g_list_foreach (typefind->cached_events,
|
||||||
(GFunc) gst_mini_object_unref, NULL);
|
(GFunc) gst_mini_object_unref, NULL);
|
||||||
|
|
Loading…
Reference in a new issue