After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 720855 - gst-rtsp-server: sort mount point sequence before lookup
gst-rtsp-server: sort mount point sequence before lookup
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
git master
Other Linux
: Normal normal
: 1.2.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-12-21 00:38 UTC by Aleix Conchillo Flaqué
Modified: 2014-02-25 22:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sort sequence before lookup (1.13 KB, patch)
2013-12-21 00:43 UTC, Aleix Conchillo Flaqué
none Details | Review

Description Aleix Conchillo Flaqué 2013-12-21 00:38:55 UTC
If you try to add mount point factories and then remove them without actually calling "gst_rtsp_mount_points_match" the sequence will be unsorted, and the g_sequence_lookup will fail.

The documentation of g_sequence_lookup reads:

   This function will fail if the data contained in the sequence is unsorted.
Comment 1 Aleix Conchillo Flaqué 2013-12-21 00:43:08 UTC
Created attachment 264657 [details] [review]
sort sequence before lookup

We sort the sequence before calling g_sequence_lookup when removing mount point factories.
Comment 2 Wim Taymans 2013-12-26 09:37:25 UTC
commit dd4c04f1b8f6a2d3cc0094d625ddfa86ba65ae26
Author: Aleix Conchillo Flaqué <aleix@oblong.com>
Date:   Fri Dec 20 16:39:07 2013 -0800

    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