return "taglib failed to return ID3v2";
}
- bv = new TagLib::ByteVector (image_bytes, image_len);
- if (bv == 0) {
- return "new TagLib::ByteVector failed";
- }
+ bv = new TagLib::ByteVector (image_bytes, image_len);
+ if (bv == 0) {
+ return "new TagLib::ByteVector failed";
+ }
- p = new TagLib::ID3v2::AttachedPictureFrame;
- if (p == 0) {
- return "new TagLib::ID3v2::AttachedPictureFrame failed";
- }
+ p = new TagLib::ID3v2::AttachedPictureFrame;
+ if (p == 0) {
+ return "new TagLib::ID3v2::AttachedPictureFrame failed";
+ }
- /* Um, look at all these void-returning functions. I'm sure
- * they can fail, i just have no way to detect it... */
- p->setType(TagLib::ID3v2::AttachedPictureFrame::FrontCover);
- p->setMimeType(mime_type);
- if (description_utf8 != 0) {
- p->setDescription(description_utf8);
- p->setTextEncoding(TagLib::String::UTF8);
- }
- p->setPicture(*bv);
+ /* Um, look at all these void-returning functions. I'm sure they can fail,
+ * i just have no way to detect it... */
+ p->setType(TagLib::ID3v2::AttachedPictureFrame::FrontCover);
+ p->setMimeType(mime_type);
+ if (description_utf8 != 0) {
+ p->setDescription(description_utf8);
+ p->setTextEncoding(TagLib::String::UTF8);
+ }
+ p->setPicture(*bv);
- // another void-returning function that i bet fails
- t->addFrame(p);
+ // another void-returning function that i bet fails
+ t->addFrame(p);
errno = 0;
if (!f->save()) {