From: Nikolay Tischenko Date: Sun, 7 Nov 2010 18:31:16 +0000 (+0600) Subject: Fixed broken image issue in taglib X-Git-Tag: 1.4.1~19 X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=9171ce8d32ef99f598ec1c1eefed07e13616e54c;p=someplayer Fixed broken image issue in taglib --- diff --git a/src/taglib/mpeg/id3v2/frames/attachedpictureframe.cpp b/src/taglib/mpeg/id3v2/frames/attachedpictureframe.cpp index a763e18..cd58360 100644 --- a/src/taglib/mpeg/id3v2/frames/attachedpictureframe.cpp +++ b/src/taglib/mpeg/id3v2/frames/attachedpictureframe.cpp @@ -133,7 +133,7 @@ void AttachedPictureFrame::parseFields(const ByteVector &data) d->textEncoding = String::Type(data[0]); - int pos = 1; + int pos = 1, poss = 1; d->mimeType = readStringField(data, String::Latin1, &pos); /* Now we need at least two more bytes available */ @@ -143,9 +143,11 @@ void AttachedPictureFrame::parseFields(const ByteVector &data) } d->type = (TagLib::ID3v2::AttachedPictureFrame::Type)data[pos++]; + + poss = pos; d->description = readStringField(data, d->textEncoding, &pos); - d->data = data.mid(pos); + d->data = data.mid(poss); } ByteVector AttachedPictureFrame::renderFields() const