[gstreamer-bugs] [Bug 348644] [id3demux] Gets the wrong part of binary blob for ID3 v2.2 tags

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Tue Jul 25 09:50:47 PDT 2006


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=348644
 GStreamer | gst-plugins-good | Ver: HEAD CVS


Tim-Philipp Müller changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|HEAD                        |0.10.4




------- Comment #3 from Tim-Philipp Müller  2006-07-25 16:50 UTC -------
Indeed, frame header sizes differ in earlier ID3v2 versions (ID3V2_HDR_SIZE was
the wrong define anyway, it was pure luck that it worked for ID3v2.4, it refers
to the tag header and not the frame header).

Should be fixed in CVS:

 2006-07-25  Tim-Philipp Müller  <tim at centricular dot net>

       * gst/id3demux/id3tags.c:
       (id3demux_add_id3v2_frame_blob_to_taglist):
         Extract frames for ID3v2 versions prior to ID3v2.3.0 properly as
         well, and add the version to the blob's buffer caps, since that
         information will be needed for deserialisation later on (#348644).


For deserialisation, you should use something like:

    ID3v2::Frame *frame;
    const GValue *val;
    GstBuffer *buf;

    val = gst_tag_list_get_value_index (list, tag, i);
    buf = (GstBuffer *) gst_value_get_mini_object (val);

    if (buf && GST_BUFFER_CAPS (buf)) {
      GstStructure *s;
      gint version = 0;

      s = gst_caps_get_structure (GST_BUFFER_CAPS (buf), 0);
      if (s && gst_structure_get_int (s, "version", &version) && version > 0) {
        ByteVector bytes ((char *) GST_BUFFER_DATA (buf), GST_BUFFER_SIZE
(buf));

        GST_DEBUG ("Injecting ID3v2.%u frame %u/%u of length %u and type %"
            GST_PTR_FORMAT, version, i, num_tags, GST_BUFFER_SIZE (buf), s);

        frame = factory->createFrame (bytes, (TagLib::uint) version);
        id3v2tag->addFrame (frame);
      }
    }

ie. use the createFrame() method that takes the ID3v2 version as last
parameter.


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list