+2004-02-09 Julien MOUTTE <julien@moutte.net>
+
+ * gst/gstdata.c: (gst_data_ref): Adding a categorized debug on data_ref
+ because data_unref has one and i prefer the debug to be symetric.
+ * gst/gstqueue.c: (gst_queue_locked_flush): Fix a huge memleak. Buffers
+ were refed when added to the queue and unrefed only once when the queue
+ was flushed. Now the flush handler unref the buffers two times : first
+ unref for the ref added when pushing in the queue's tail and second
+ unref to destroy the flushed buffer.
+
2004-02-08 Thomas Vander Stichele <thomas at apestaart dot org>
* docs/pwg/building-boiler.xml: fix cvs checkout documentation
g_return_val_if_fail (data != NULL, NULL);
g_return_val_if_fail (GST_DATA_REFCOUNT_VALUE(data) > 0, NULL);
+ GST_CAT_LOG (GST_CAT_BUFFER, "ref data %p, count before ref is %d",
+ data, GST_DATA_REFCOUNT_VALUE (data));
+
gst_atomic_int_inc (&data->refcount);
return data;
{
while (!g_queue_is_empty (queue->queue)) {
GstData *data = g_queue_pop_head (queue->queue);
+ /* First loose the reference we added when putting that data in the queue */
+ gst_data_unref (data);
+ /* Then loose another reference because we are supposed to destroy that
+ data when flushing */
gst_data_unref (data);
}
queue->timeval = NULL;
{
while (!g_queue_is_empty (queue->queue)) {
GstData *data = g_queue_pop_head (queue->queue);
+ /* First loose the reference we added when putting that data in the queue */
+ gst_data_unref (data);
+ /* Then loose another reference because we are supposed to destroy that
+ data when flushing */
gst_data_unref (data);
}
queue->timeval = NULL;