+ int image_type = ID3v2::AttachedPictureFrame::Other;
+
+ if (info_struct) {
+ if (gst_structure_get (info_struct, "image-type",
+ GST_TYPE_TAG_IMAGE_TYPE, &image_type, NULL)) {
+ if (image_type > 0 && image_type <= 18) {
+ image_type += 2;
+ } else {
+ image_type = ID3v2::AttachedPictureFrame::Other;
+ }
+ }
+ }
+
+ frame->setType ((TagLib::ID3v2::AttachedPictureFrame::Type) image_type);