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 739722 - matroskamux: Thread safe register GstMatroskamuxPad
matroskamux: Thread safe register GstMatroskamuxPad
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other Linux
: Normal normal
: 1.4.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-11-06 11:17 UTC by Göran Jönsson
Modified: 2014-11-19 16:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for gst-plugins-good (1017 bytes, patch)
2014-11-06 11:17 UTC, Göran Jönsson
needs-work Details | Review
New gst-plugins-good.patch (1.02 KB, patch)
2014-11-06 14:40 UTC, Göran Jönsson
committed Details | Review

Description Göran Jönsson 2014-11-06 11:17:09 UTC
Created attachment 290090 [details] [review]
patch for gst-plugins-good

The function gst_matroskamux_pad_get_type is not thread safe.
If one thread is reading type and sees that it 0 and call g_type_register_static_simple but before write to type another thread is doing the same.
Comment 1 Sebastian Dröge (slomo) 2014-11-06 11:33:16 UTC
Comment on attachment 290090 [details] [review]
patch for gst-plugins-good

This should use g_once_init_enter()/_leave() as all the other type registration code... or ideally just use the G_DEFINE_TYPE() macro.
Comment 2 Göran Jönsson 2014-11-06 14:40:53 UTC
Created attachment 290111 [details] [review]
New gst-plugins-good.patch
Comment 3 Tim-Philipp Müller 2014-11-07 21:21:45 UTC
Pushed, thanks:

commit ec05d3b6d85af824d7984bff6adbd839b946d481
Author: Göran Jönsson <goranjn@axis.com>
Date:   Thu Nov 6 15:37:28 2014 +0100

    matroskamux: make GstMatroskamuxPad get_type() function thread-safe
    
    https://bugzilla.gnome.org/show_bug.cgi?id=739722