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 512578 - gst_tag_setter_merge_tags can mess up with KEEP_ALL merge mode
gst_tag_setter_merge_tags can mess up with KEEP_ALL merge mode
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal normal
: 0.10.20
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-28 15:21 UTC by René Stadler
Modified: 2008-04-13 19:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add gst_tag_setter_merge_tags tests (3.80 KB, patch)
2008-01-28 15:22 UTC, René Stadler
committed Details | Review
Fix gst_tag_setter_merge_tags with KEEP_ALL merge mode (696 bytes, patch)
2008-01-28 15:23 UTC, René Stadler
committed Details | Review

Description René Stadler 2008-01-28 15:21:34 UTC
gst_tag_setter_merge_tags unconditionally copies over the given tag list if the tag setter's list was unset before.  This is wrong for GST_TAG_MERGE_KEEP_ALL, which is essentially a no-op.

Attaching test suite additions and fix.
Comment 1 René Stadler 2008-01-28 15:22:35 UTC
Created attachment 103891 [details] [review]
Add gst_tag_setter_merge_tags tests
Comment 2 René Stadler 2008-01-28 15:23:49 UTC
Created attachment 103892 [details] [review]
Fix gst_tag_setter_merge_tags with KEEP_ALL merge mode
Comment 3 Tim-Philipp Müller 2008-04-13 19:58:49 UTC
Committed, thanks:

 2008-04-13  Tim-Philipp Müller  <tim at centricular dot net>

        Patch by: Rene Stadler <mail at renestadler de>

        * gst/gsttagsetter.c: (gst_tag_setter_merge_tags):
          Merging an empty list with another list in KEEP_ALL mode should
          yield an empty list as result and not the second list (#512578).

        * tests/check/gst/gsttagsetter.c:
          Add unit test for tag merge modes and the aforementioned bug.