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 637776 - merging the same tag values again produces lists containing duplicates
merging the same tag values again produces lists containing duplicates
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.32
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-12-21 20:38 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2011-01-03 15:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
don't produce duplicated entries when merging same value twice (5.67 KB, patch)
2010-12-21 21:03 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review
gstvalue: make gst_value_list_merge() work properly (2.18 KB, patch)
2011-01-03 01:09 UTC, Tim-Philipp Müller
committed Details | Review

Description Stefan Sauer (gstreamer, gtkdoc dev) 2010-12-21 20:38:12 UTC
gst-launch-0.10 -t playbin2 uri=http://www.eksor.de/songs/symphonie/06-NeuralConnection.ogg

gst-discoverer-0.10 -v http://www.eksor.de/songs/symphonie/06-NeuralConnection.ogg

While maybe the issue here is that both oggdemux and vorbisdec find the tags, I also think gsttaglist.c::gst_tag_list_add_value_internal() could be smarter to not make a list if the value is already in the list.
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2010-12-21 21:03:41 UTC
Created attachment 176865 [details] [review]
don't produce duplicated entries when merging same value twice

We probably need a gst_value_list_merge() and use that instead.
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2010-12-21 21:07:28 UTC
Irks, lets me know what you think about the issue and solution. Patch needs work - it should first scan for duplicates and then act accordingly. Right now it produces gobject warnings:

(gst-mi:25953): GLib-GObject-WARNING **: gvalue.c:185: cannot initialize GValue with type `gchararray', the value has already been initialized as `GstValueList'
(gst-mi:25953): GLib-GObject-CRITICAL **: g_value_copy: assertion `g_value_type_compatible (G_VALUE_TYPE (src_value), G_VALUE_TYPE (dest_value))' failed
(gst-mi:25953): GLib-GObject-CRITICAL **: g_value_unset: assertion `G_IS_VALUE (value)' failed
(gst-mi:25953): GStreamer-CRITICAL **: gst_structure_id_set_value: assertion `G_IS_VALUE (value)' failed
Comment 3 Tim-Philipp Müller 2011-01-03 01:09:58 UTC
Created attachment 177387 [details] [review]
gstvalue: make gst_value_list_merge() work properly
Comment 4 Tim-Philipp Müller 2011-01-03 15:58:52 UTC
commit ee5b369ffd72368e53b5fdfce46390efbc83481d
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Mon Jan 3 01:06:06 2011 +0000

    gstvalue: make new gst_value_list_merge() work properly
    
    Fix freeing of partially-inited list value when both values
    passed are equal and we want to return a single non-list
    value as result. Fixes unit test. Also fix up docs a bit.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=637776

commit 373be6f14ea8f548360dc565c6124c5368cc273c
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Tue Dec 21 23:03:12 2010 +0200

    tags: don't produce duplicated entries when merging same value twice
    
    Add a variant of gst_value_list_concat() that skips duplicates and use that when
    merging taglists.
    
    API: gst_value_list_merge()