GNOME Bugzilla – Bug 646696
taginject throws critical warnings when date tag cannot be parsed
Last modified: 2011-04-05 12:41:48 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
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.
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.
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.
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