diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2018-05-26 15:58:21 +0000 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2018-06-12 16:57:03 +0200 |
commit | 23b5926885683987ac8706dddd8cbc195ba40d18 (patch) | |
tree | ab490e59e5bd29a0619243d77267e3d0f63253dc /gst | |
parent | a353ab3beb5182857f24b9bf8771da2fa3f8c79a (diff) | |
download | libnice-23b5926885683987ac8706dddd8cbc195ba40d18.tar.gz |
Fix cast-function-type warning introduced in GCC 8
This is new warning introduced with GCC 8. This is being fixed by using appropriate function, like g_queue_free_full/g_list_free_full or by casting to GCallback before casting to the target function signature.
Closes: #46
Diffstat (limited to 'gst')
-rw-r--r-- | gst/gstnicesrc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gst/gstnicesrc.c b/gst/gstnicesrc.c index d369e09..a3f223e 100644 --- a/gst/gstnicesrc.c +++ b/gst/gstnicesrc.c @@ -327,8 +327,7 @@ gst_nice_src_dispose (GObject *object) src->mainctx = NULL; if (src->outbufs) { - g_queue_foreach (src->outbufs, (GFunc) gst_buffer_unref, NULL); - g_queue_free (src->outbufs); + g_queue_free_full (src->outbufs, (GDestroyNotify) gst_buffer_unref); } src->outbufs = NULL; @@ -430,8 +429,7 @@ 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_foreach (src->outbufs, (GFunc) gst_buffer_unref, NULL); - g_queue_clear (src->outbufs); + g_queue_free_full (src->outbufs, (GDestroyNotify) gst_buffer_unref); GST_OBJECT_UNLOCK (src); break; case GST_STATE_CHANGE_READY_TO_PAUSED: |