gst/gstbin.c: Don't cache duration messages if we're not going to use or free them.

Original commit message from CVS:
* gst/gstbin.c: (bin_remove_messages), (bin_query_duration_done):
Don't cache duration messages if we're not going to use or
free them.
This commit is contained in:
Wim Taymans 2006-01-31 18:46:15 +00:00
parent dad303a342
commit b6192a81bd
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2006-01-31 Wim Taymans <wim@fluendo.com>
* gst/gstbin.c: (bin_remove_messages), (bin_query_duration_done):
Don't cache duration messages if we're not going to use or
free them.
2006-01-31 Stefan Kost <ensonic@users.sf.net>
* docs/manual/advanced-dparams.xml:

View file

@ -629,7 +629,7 @@ bin_remove_messages (GstBin * bin, GstObject * src, GstMessageType types)
gst_message_unref (message);
} else {
GST_DEBUG_OBJECT (GST_MESSAGE_SRC (message),
"not deleting message of types %d", types);
"not deleting message of type %d", GST_MESSAGE_TYPE (message));
}
}
}
@ -2187,11 +2187,13 @@ bin_query_duration_done (GstBin * bin, QueryFold * fold)
GST_DEBUG_OBJECT (bin, "max duration %" G_GINT64_FORMAT, fold->max);
#if 0
/* and cache now */
GST_OBJECT_LOCK (bin);
bin->messages = g_list_prepend (bin->messages,
gst_message_new_duration (GST_OBJECT_CAST (bin), format, fold->max));
GST_OBJECT_UNLOCK (bin);
#endif
}
/* generic fold, return first valid result */