rtpjitterbuffer: g_queue_clear_full introduced in glib 2.60

Define g_queue_clear_full if glib < 2.60.

Fixes #747

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/619>
This commit is contained in:
U. Artie Eoff 2020-06-09 13:09:20 -07:00
parent 29a661d4a4
commit bf0842aa0c

View file

@ -269,6 +269,18 @@ enum
#define GST_BUFFER_IS_RETRANSMISSION(buffer) \
GST_BUFFER_FLAG_IS_SET (buffer, GST_RTP_BUFFER_FLAG_RETRANSMISSION)
#if !GLIB_CHECK_VERSION(2, 60, 0)
#define g_queue_clear_full queue_clear_full
static void
queue_clear_full (GQueue * queue, GDestroyNotify free_func)
{
gpointer data;
while ((data = g_queue_pop_head (queue)) != NULL)
free_func (data);
}
#endif
struct _GstRtpJitterBufferPrivate
{
GstPad *sinkpad, *srcpad;