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 646696 - taginject throws critical warnings when date tag cannot be parsed
taginject throws critical warnings when date tag cannot be parsed
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.25
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-04 10:07 UTC by andres_jebidepalo
Modified: 2011-04-05 12:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description andres_jebidepalo 2011-04-04 10:07:52 UTC
Example pipeline:
gst-launch audiotestsrc num-buffers=100 ! taginject tags="title=testsrc,artist=\"gstreamer\",license=\"CC by\",date=\"Mon Apr 4 2011\"" ! vorbisenc ! oggmux ! filesink location=test2.ogg 

Warnings:

(gst-launch-0.10:2137): GLib-GObject-CRITICAL **: g_value_dup_boxed: assertion `G_VALUE_HOLDS_BOXED (value)' failed

** (gst-launch-0.10:2137): CRITICAL **: file gstvorbistag.c: line 591 (gst_tag_to_vorbis_comments): should not be reached
Comment 1 Arun Raghavan 2011-04-04 11:40:59 UTC
Looks like date is expected to be a boxed type (GDate) whereas it's being set as a string here, which is not permitted as far as I can tell.
Comment 2 Sebastian Dröge (slomo) 2011-04-04 11:59:20 UTC
There's gst_value_deserialize_date() which will take care of this. It only accepts strings of the format YYYY-MM-DD. Nonetheless the error checking for this somewhere should prevent adding a NULL GDate to the GstStructure/GstTagList.
Comment 3 Sebastian Dröge (slomo) 2011-04-05 12:39:11 UTC
With the following commit this works now by using
date=(date)"2010-11-12"


commit 5860734aaf214a69383af3a5435102e70fde270b
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Tue Apr 5 14:36:43 2011 +0200

    structure: Add date as a type abbreviation of GDate
    
    See bug #646696.
Comment 4 Sebastian Dröge (slomo) 2011-04-05 12:41:48 UTC
IMHO we can close this bug then. The problem here is that gst_structure_from_string() is used and the date without a type name is interpreted as a string. GST_TAG_DATE must be of type GDate though and getting that tag results in the assertion you saw.

As taginject is just a debugging utility this shouldn't be a problem and you can easily work around it by adding the correct type names for every tag.


Feel free to reopen the bug if you disagree