Correctly parse covr atoms with type 0

(upstream git commit 3a5aeb457324f9dcac2c0051e94b0d748af63f65)
This commit is contained in:
dcoppa 2012-11-12 11:12:03 +00:00
parent 46f826992d
commit 8011235fd9
3 changed files with 41 additions and 6 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.27 2012/11/07 09:48:20 dcoppa Exp $
# $OpenBSD: Makefile,v 1.28 2012/11/12 11:12:03 dcoppa Exp $
COMMENT= managing meta-data of audio formats
DISTNAME= taglib-1.8
REVISION= 2
REVISION= 3
CATEGORIES= audio devel
MASTER_SITES= https://github.com/downloads/taglib/taglib/

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-taglib_mp4_mp4coverart_h,v 1.1 2012/11/12 11:12:03 dcoppa Exp $
Correctly parse covr atoms with type 0
(upstream git commit 3a5aeb457324f9dcac2c0051e94b0d748af63f65)
--- taglib/mp4/mp4coverart.h.orig Mon Nov 12 10:49:36 2012
+++ taglib/mp4/mp4coverart.h Mon Nov 12 10:50:42 2012
@@ -45,7 +45,8 @@ namespace TagLib {
JPEG = TypeJPEG,
PNG = TypePNG,
BMP = TypeBMP,
- GIF = TypeGIF
+ GIF = TypeGIF,
+ Unknown = TypeImplicit,
};
CoverArt(Format format, const ByteVector &data);

View File

@ -1,11 +1,29 @@
$OpenBSD: patch-taglib_mp4_mp4tag_cpp,v 1.1 2012/10/16 13:06:13 dcoppa Exp $
$OpenBSD: patch-taglib_mp4_mp4tag_cpp,v 1.2 2012/11/12 11:12:03 dcoppa Exp $
Correctly parse covr atoms with type 0
(upstream git commit 3a5aeb457324f9dcac2c0051e94b0d748af63f65)
Fix a bug in updating MP4 tags
(upstream git commit a9df3e48f7b59bc27e115e5b0ad057a642b6fac3)
--- taglib/mp4/mp4tag.cpp.orig Tue Oct 16 13:49:35 2012
+++ taglib/mp4/mp4tag.cpp Tue Oct 16 13:50:12 2012
@@ -570,7 +570,7 @@ MP4::Tag::updateOffsets(long delta, long offset)
--- taglib/mp4/mp4tag.cpp.orig Thu Sep 6 20:03:15 2012
+++ taglib/mp4/mp4tag.cpp Mon Nov 12 10:53:31 2012
@@ -283,10 +283,13 @@ MP4::Tag::parseCovr(MP4::Atom *atom, TagLib::File *fil
debug("MP4: Unexpected atom \"" + name + "\", expecting \"data\"");
break;
}
- if(flags == TypeJPEG || flags == TypePNG || flags == TypeBMP || flags == TypeGIF) {
+ if(flags == TypeJPEG || flags == TypePNG || flags == TypeBMP || flags == TypeGIF || flags == TypeImplicit) {
value.append(MP4::CoverArt(MP4::CoverArt::Format(flags),
data.mid(pos + 16, length - 16)));
}
+ else {
+ debug("MP4: Unknown covr format " + String::number(flags));
+ }
pos += length;
}
if(value.size() > 0)
@@ -570,7 +573,7 @@ MP4::Tag::updateOffsets(long delta, long offset)
atom->offset += delta;
}
d->file->seek(atom->offset + 9);