GNOME Bugzilla – Bug 343127
[apedemux] extract track count, clean up parsing
Last modified: 2006-05-28 14:41:21 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
Created attachment 66342 [details] [review] apedemux-parsing-cleanup.diff the patch
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).