summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2007-05-15 03:45:45 +0000
committerDavid Schleef <ds@schleef.org>2007-05-15 03:45:45 +0000
commit8a6fbd7544ef534d5f3dfaae6e1d91209aa80318 (patch)
treef358a5d00acd0237b177da9a56998b59e8119de2 /gst/rtpmanager
parentdc997023cdcb8e76b9a6e2700322cf8f7fff2ff8 (diff)
downloadgst-plugins-bad-8a6fbd7544ef534d5f3dfaae6e1d91209aa80318.tar.gz
gst-plugins-bad-8a6fbd7544ef534d5f3dfaae6e1d91209aa80318.tar.bz2
gst-plugins-bad-8a6fbd7544ef534d5f3dfaae6e1d91209aa80318.zip
gst/rtpmanager/gstrtpbin.c: g_hash_table_remove_all() only exists in 2.12. Work around.
Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: g_hash_table_remove_all() only exists in 2.12. Work around.
Diffstat (limited to 'gst/rtpmanager')
-rw-r--r--gst/rtpmanager/gstrtpbin.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c
index a6cd3840..58a06926 100644
--- a/gst/rtpmanager/gstrtpbin.c
+++ b/gst/rtpmanager/gstrtpbin.c
@@ -335,6 +335,12 @@ no_caps:
}
}
+static gboolean
+return_true (gpointer key, gpointer value, gpointer user_data)
+{
+ return TRUE;
+}
+
static void
gst_rtp_bin_clear_pt_map (GstRTPBin * bin)
{
@@ -345,7 +351,12 @@ gst_rtp_bin_clear_pt_map (GstRTPBin * bin)
GstRTPBinSession *session = (GstRTPBinSession *) walk->data;
GST_RTP_SESSION_LOCK (session);
+#if 0
+ /* This requires GLib 2.12 */
g_hash_table_remove_all (session->ptmap);
+#else
+ g_hash_table_foreach_remove (session->ptmap, return_true, NULL);
+#endif
GST_RTP_SESSION_UNLOCK (session);
}
GST_RTP_BIN_UNLOCK (bin);