diff options
author | U. Artie Eoff <ullysses.a.eoff@intel.com> | 2020-06-09 13:09:20 -0700 |
---|---|---|
committer | U. Artie Eoff <ullysses.a.eoff@intel.com> | 2020-06-09 13:09:20 -0700 |
commit | bf0842aa0c468495d47bf63526f083283f474d68 (patch) | |
tree | 65641d70a9b3ce381d24d494c49bfc693f5eba0b | |
parent | 29a661d4a41fee2227d2578e7991214b99d3bf1c (diff) |
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>
-rw-r--r-- | gst/rtpmanager/gstrtpjitterbuffer.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c b/gst/rtpmanager/gstrtpjitterbuffer.c index 1d698ba9c9..f39b6ce55e 100644 --- a/gst/rtpmanager/gstrtpjitterbuffer.c +++ b/gst/rtpmanager/gstrtpjitterbuffer.c @@ -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; |