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 753922 - GValue types are registered after types that might use them (e.g. tags)
GValue types are registered after types that might use them (e.g. tags)
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Mac OS
: Normal normal
: 1.9.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 753779
 
 
Reported: 2015-08-21 11:31 UTC by minfrin
Modified: 2016-09-30 07:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-Ensure-gst_value-is-initialised-before-gst_tag-so-th.patch (910 bytes, patch)
2015-08-21 11:31 UTC, minfrin
none Details | Review
Ensure gst_value is initialised before gst_tag so that GST_TYPE_FRACTION will work correctly in tags (957 bytes, patch)
2016-09-09 23:41 UTC, minfrin
committed Details | Review

Description minfrin 2015-08-21 11:31:10 UTC
Created attachment 309801 [details] [review]
0001-Ensure-gst_value-is-initialised-before-gst_tag-so-th.patch

When an attempt is made to create a tag that is typed using a GST_TYPE_FRACTION, this fails because tags are initialised before "values", including GST_TYPE_FRACTION.

This results in the following assertion failure caused by the not-yet-initialised type having the value zero:

(lt-gst-plugins-base-libs-scan:1546): GStreamer-CRITICAL **: gst_tag_register_static: assertion 'type != 0 && type != GST_TYPE_LIST' failed

Patch attached to fix this.
Comment 1 Tim-Philipp Müller 2015-08-21 11:41:03 UTC
I'm guessing this only happens if you patch gsttaglist.c to register tags with such a type? If yes, this patch should perhaps go with the other patch that does that?
Comment 2 minfrin 2015-08-22 12:36:47 UTC
I believe we shouldn't combine this with the other patch, as this is a general bug that affects anybody who adds a tag containing a fraction, not just frame-rate.

Bugs and new features should be kept separate from one another.
Comment 3 Tim-Philipp Müller 2015-08-22 14:11:57 UTC
It doesn't affect anyone who tries to do this after/outside of gst_init() though [meaning: only if you patch gstreamer core], or am I missing something?
Comment 4 minfrin 2015-08-22 15:11:03 UTC
It will affect anybody who tries to add another tag to the core based on anything configured in gst_value.

When they search google to debug their issue, they will find this bug report and patch, and will not have to dig through a whole lot of new feature stuff that will not be relevant to their problem.
Comment 5 minfrin 2015-10-12 22:29:46 UTC
Confirming the same patch applies to git-master.
Comment 6 minfrin 2016-09-09 23:41:54 UTC
Created attachment 335221 [details] [review]
Ensure gst_value is initialised before gst_tag so that  GST_TYPE_FRACTION will work correctly in tags

Update comment, ensure applies to git master.
Comment 7 Sebastian Dröge (slomo) 2016-09-10 08:01:11 UTC
commit 84fcec006540d54b52843151f484c4c2aef8dfe9
Author: Graham Leggett <minfrin@sharp.fm>
Date:   Fri Nov 13 16:00:02 2015 +0000

    gst: Ensure gst_value is initialised before gst_tag
    
    Otherwise GST_TYPE_FRACTION will work correctly in tags.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753922
Comment 8 Sebastian Dröge (slomo) 2016-09-10 08:02:09 UTC
Let's get this one in at least, it seems to make sense even independent of the other patches.