diff --git a/gst/elements/gstqueue.c b/gst/elements/gstqueue.c index 8224cb5cb4..4ead691ed3 100644 --- a/gst/elements/gstqueue.c +++ b/gst/elements/gstqueue.c @@ -198,6 +198,7 @@ void gst_queue_push(GstConnection *connection) { buf = (GstBuffer *)(front->data); queue->queue = g_list_remove_link(queue->queue,front); gst_pad_push(queue->srcpad,buf); + g_list_free(front); queue->level_buffers--; // g_print("-"); diff --git a/gst/gstbuffer.c b/gst/gstbuffer.c index 4494f86c73..7a791545b8 100644 --- a/gst/gstbuffer.c +++ b/gst/gstbuffer.c @@ -124,10 +124,12 @@ void gst_buffer_destroy(GstBuffer *buffer) { g_return_if_fail(buffer != NULL); - if (buffer->parent != NULL) + if (buffer->parent != NULL) { DEBUG("BUF: freeing subbuffer %p\n",buffer); - else + } + else { DEBUG("BUF: freeing buffer %p\n",buffer); + } // free the data only if there is some, DONTFREE isn't set, and not sub if (GST_BUFFER_DATA(buffer) && @@ -162,7 +164,7 @@ void gst_buffer_ref(GstBuffer *buffer) { DEBUG("BUF: referencing buffer %p\n",buffer); #ifdef HAVE_ATOMIC_H - g_return_if_fail(atomic_read(&(buffer->refcount)) > 0); + //g_return_if_fail(atomic_read(&(buffer->refcount)) > 0); atomic_inc(&(buffer->refcount)) #else g_return_if_fail(buffer->refcount > 0); diff --git a/gst/gstplugin.c b/gst/gstplugin.c index 428f084d22..c045ff4070 100644 --- a/gst/gstplugin.c +++ b/gst/gstplugin.c @@ -200,7 +200,7 @@ gboolean gst_plugin_load_absolute(gchar *name) { * Returns: new plugin */ GstPlugin *gst_plugin_new(gchar *name) { - GstPlugin *plugin = (GstPlugin *)malloc(sizeof(GstPlugin)); + GstPlugin *plugin = (GstPlugin *)g_malloc(sizeof(GstPlugin)); plugin->name = g_strdup(name); plugin->longname = NULL; diff --git a/gst/gsttype.c b/gst/gsttype.c index 7c0bcf9c94..72726dc120 100644 --- a/gst/gsttype.c +++ b/gst/gsttype.c @@ -49,7 +49,7 @@ guint16 gst_type_register(GstTypeFactory *factory) { // id = gst_type_find_by_mime(factory->mime); id = 0; if (!id) { - type = (GstType *)malloc(sizeof(GstType)); + type = (GstType *)g_malloc(sizeof(GstType)); type->id = _gst_maxtype++; type->mime = factory->mime; diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index 8224cb5cb4..4ead691ed3 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -198,6 +198,7 @@ void gst_queue_push(GstConnection *connection) { buf = (GstBuffer *)(front->data); queue->queue = g_list_remove_link(queue->queue,front); gst_pad_push(queue->srcpad,buf); + g_list_free(front); queue->level_buffers--; // g_print("-"); diff --git a/test/mp1parse.c b/test/mp1parse.c index 79d8de2f6c..634b13ad86 100644 --- a/test/mp1parse.c +++ b/test/mp1parse.c @@ -144,6 +144,8 @@ int main(int argc,char *argv[]) { xmlSaveFile("mp1parse.xml",gst_xml_write(GST_ELEMENT(pipeline))); g_print("about to enter loop\n"); - while (1) + while (1) { gst_src_push(GST_SRC(src)); + } + } diff --git a/test/mp3play.c b/test/mp3play.c index 7e3c0a2a13..60d63add25 100644 --- a/test/mp3play.c +++ b/test/mp3play.c @@ -62,6 +62,7 @@ int main(int argc,char *argv[]) { gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_RUNNING); g_print("about to enter loop\n"); - while (1) + while (1) { gst_src_push(GST_SRC(src)); + } }