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 343127 - [apedemux] extract track count, clean up parsing
[apedemux] extract track count, clean up parsing
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-05-27 18:55 UTC by Sebastian Dröge (slomo)
Modified: 2006-05-28 14:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
apedemux-parsing-cleanup.diff (2.96 KB, patch)
2006-05-27 18:55 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2006-05-27 18:55:28 UTC
Hi,
the attached patch cleans up parsing of the APE tags. sscanf() is now used instead of atoi() (or even worse atof() for uints)- Depending on whether we can parse it or not the GValue gets initialized or not and a special case for the "Track" tag is implemented:
According to the spec[1] it can be TRACK_NUMBER/TRACK_COUNT thus we check for this and a fill in TRACK_COUNT if possible.

[1] http://www.personal.uni-jena.de/~pfk/mpp/sv8/apekey.html

Bye
Comment 1 Sebastian Dröge (slomo) 2006-05-27 18:55:48 UTC
Created attachment 66342 [details] [review]
apedemux-parsing-cleanup.diff

the patch
Comment 2 Tim-Philipp Müller 2006-05-28 14:41:21 UTC
Thanks, committed with some small modifications (like using gst_tag_list_add() instead of _add_values()):

 2006-05-28  Tim-Philipp Müller  <tim at centricular dot net>

        Patch by: Sebastian Dröge  <slomo at ubuntu dot com>

        * gst/apetag/gstapedemux.c: (ape_demux_get_gst_tag_from_tag),
        (ape_demux_parse_tags):
          Some clean-ups and additions: map APE 'file' tag to
          GST_TAG_LOCATION (#343123); add support for extracting
          the track count and clean up parsing a bit (#343127).