Commit 3770519e authored by Nicolas Dufresne's avatar Nicolas Dufresne

Fix queue_clear replaced by queue_free error

There was two cases where instead of freeing the queue, we actually
clear the queue so it's ready for reused. Notably in
nice_socket_free_send_queue(), a missed name function and nicesrc
element state change.

This regression was introduced by: fa783b1dd727a6ee2b99a111ca24790ae850c2f7
parent 23b59268
......@@ -429,7 +429,8 @@ gst_nice_src_change_state (GstElement * element, GstStateChange transition)
nice_agent_attach_recv (src->agent, src->stream_id, src->component_id,
src->mainctx, NULL, NULL);
GST_OBJECT_LOCK (src);
g_queue_free_full (src->outbufs, (GDestroyNotify) gst_buffer_unref);
g_list_free_full (src->outbufs->head, (GDestroyNotify) gst_buffer_unref);
g_queue_init (src->outbufs);
GST_OBJECT_UNLOCK (src);
break;
case GST_STATE_CHANGE_READY_TO_PAUSED:
......
......@@ -450,5 +450,6 @@ gboolean nice_socket_flush_send_queue_to_socket (GSocket *gsock,
void
nice_socket_free_send_queue (GQueue *send_queue)
{
g_queue_free_full (send_queue, (GDestroyNotify) nice_socket_free_queued_send);
g_list_free_full (send_queue->head, (GDestroyNotify) nice_socket_free_queued_send);
g_queue_init (send_queue);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment