mount-points: sort sequence before g_sequence_lookup

* gst/rtsp-server/rtsp-mount-points.c (gst_rtsp_mount_points_remove_factory):
  sort sequence if dirty, otherwise lookup will fail.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720855
This commit is contained in:
Aleix Conchillo Flaqué 2013-12-20 16:39:07 -08:00 committed by Wim Taymans
parent 2b8a972dae
commit dd4c04f1b8

View file

@ -356,6 +356,10 @@ gst_rtsp_mount_points_remove_factory (GstRTSPMountPoints * mounts,
GST_INFO ("removing media factory for path %s", path);
g_mutex_lock (&priv->lock);
if (priv->dirty) {
g_sequence_sort (priv->mounts, data_item_compare, mounts);
priv->dirty = FALSE;
}
iter = g_sequence_lookup (priv->mounts, &item, data_item_compare, mounts);
if (iter) {
g_sequence_remove (iter);