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 771555 - rtsp-server can fail to find added media factories
rtsp-server can fail to find added media factories
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
git master
Other Linux
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-16 20:41 UTC by Andrew Bott
Modified: 2018-01-25 12:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that fixes this bug, applied to version 1.4.5 to fix this issue. I think the patch is also relevant to master/latest release. (749 bytes, patch)
2016-09-16 20:41 UTC, Andrew Bott
none Details | Review

Description Andrew Bott 2016-09-16 20:41:19 UTC
Created attachment 335735 [details] [review]
Patch that fixes this bug, applied to version 1.4.5 to fix this issue. I think the patch is also relevant to master/latest release.

The bug observed occurs where one path added to gst_rtsp_mount_points_add_factory is a prefix to two or more other paths added by the same.

Example:
/raw
/raw/video
/raw/snapshot

I've patched this bug in a local project. Attached the patch for your reference.
Comment 1 Tim-Philipp Müller 2018-01-25 12:17:07 UTC
Thanks for the bug report and the patch. Sorry it took so long to get to it.

Next time it would be great if you could provide the patch in "git format-patch" format (with author/commit message) and add something to the unit test as well.

commit 5964247829b8b6011b535be0dcfafc572467b809 (HEAD -> master)
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Thu Jan 25 12:09:03 2018 +0000

    mount-points: bail out of loop again when matching mount points
    
    Previous patch led to us iterating the entire sequence. Bail out
    of the loop again if we have a match but are moving away from it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771555

commit f5b99d8fcebe9ec00a2c9c9f550d25caa253bac1
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Thu Jan 25 12:06:57 2018 +0000

    tests: mountpoints: add more checks for mount point path matching
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771555

commit c3e58dfdbe61ddc19441a8251caa0cbc5a669a2e
Author: Andrew Bott <andrew.bott@blackmoth.com>
Date:   Fri Sep 16 20:41:19 2016 +0000

    mount-points: fix matching of paths where there's also an entry with a common prefix
    
    e.g. with the following mount points
    
    /raw
    /raw/snapshot
    /raw/video
    
    _match() would not match /raw/video and /raw/snapshot correctly.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771555