rpms/taglib/devel taglib-1.6.1-20100126.patch, NONE, 1.1 taglib.spec, 1.49, 1.50

Michael Schwendt mschwendt at fedoraproject.org
Tue Jan 26 20:37:10 UTC 2010


Author: mschwendt

Update of /cvs/pkgs/rpms/taglib/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16135

Modified Files:
	taglib.spec 
Added Files:
	taglib-1.6.1-20100126.patch 
Log Message:
* Tue Jan 26 2010 Michael Schwendt <mschwendt at fedoraproject.org> - 1.6.1-3
- Update with four post-1.6.1 fixes from 20100126
  (r1056922, r1062026, r1062426, r1078611).


taglib-1.6.1-20100126.patch:
 asf/asftag.cpp                |    9 +++++++--
 mp4/mp4file.cpp               |    7 +++++++
 mp4/mp4tag.cpp                |    8 ++++----
 mpeg/id3v2/id3v2synchdata.cpp |   20 +++++++++++++++++++-
 4 files changed, 37 insertions(+), 7 deletions(-)

--- NEW FILE taglib-1.6.1-20100126.patch ---
--- taglib-1.6.1/taglib/asf/asftag.cpp	2009-09-08 09:26:12.000000000 +0200
+++ taglib-20100126/taglib/asf/asftag.cpp	2009-12-13 19:12:03.000000000 +0100
@@ -105,8 +105,13 @@
 unsigned int
 ASF::Tag::track() const
 {
-  if(d->attributeListMap.contains("WM/TrackNumber"))
-    return d->attributeListMap["WM/TrackNumber"][0].toString().toInt();
+  if(d->attributeListMap.contains("WM/TrackNumber")) {
+    const ASF::Attribute attr = d->attributeListMap["WM/TrackNumber"][0];
+    if(attr.type() == ASF::Attribute::DWordType)
+      return attr.toUInt();
+    else
+      return attr.toString().toInt();
+  }
   if(d->attributeListMap.contains("WM/Track"))
     return d->attributeListMap["WM/Track"][0].toUInt();
   return 0;
--- taglib-1.6.1/taglib/mpeg/id3v2/id3v2synchdata.cpp	2008-02-06 06:00:24.000000000 +0100
+++ taglib-20100126/taglib/mpeg/id3v2/id3v2synchdata.cpp	2009-12-01 19:12:04.000000000 +0100
@@ -33,10 +33,28 @@
 TagLib::uint SynchData::toUInt(const ByteVector &data)
 {
   uint sum = 0;
+  bool notSynchSafe = false;
   int last = data.size() > 4 ? 3 : data.size() - 1;
 
-  for(int i = 0; i <= last; i++)
+  for(int i = 0; i <= last; i++) {
+    if(data[i] & 0x80) {
+      notSynchSafe = true;
+      break;
+    }
+
     sum |= (data[i] & 0x7f) << ((last - i) * 7);
+  }
+
+  if(notSynchSafe) {
+    /*
+     * Invalid data; assume this was created by some buggy software that just
+     * put normal integers here rather than syncsafe ones, and try it that
+     * way.
+     */
+    sum = 0;
+    for(int i = 0; i <= last; i++)
+      sum |= data[i] << ((last - i) * 8);
+  }
 
   return sum;
 }
--- taglib-1.6.1/taglib/mp4/mp4file.cpp	2009-10-31 09:59:40.000000000 +0100
+++ taglib-20100126/taglib/mp4/mp4file.cpp	2009-12-15 19:12:03.000000000 +0100
@@ -113,6 +113,13 @@
     return;
   }
 
+  // must have a moov atom, otherwise consider it invalid
+  MP4::Atom *moov = d->atoms->find("moov");
+  if(!moov) {
+    setValid(false);
+    return;
+  }
+
   d->tag = new Tag(this, d->atoms);
   if(readProperties) {
     d->properties = new Properties(this, d->atoms, audioPropertiesStyle);
--- taglib-1.6.1/taglib/mp4/mp4tag.cpp	2009-10-29 16:53:20.000000000 +0100
+++ taglib-20100126/taglib/mp4/mp4tag.cpp	2010-01-24 19:12:02.000000000 +0100
@@ -42,12 +42,12 @@
 public:
   TagPrivate() : file(0), atoms(0) {}
   ~TagPrivate() {}
-  File *file;
+  TagLib::File *file;
   Atoms *atoms;
   ItemListMap items;
 };
 
-MP4::Tag::Tag(File *file, MP4::Atoms *atoms)
+MP4::Tag::Tag(TagLib::File *file, MP4::Atoms *atoms)
 {
   d = new TagPrivate;
   d->file = file;
@@ -270,7 +270,7 @@
               ByteVector::fromShort(item.toIntPair().first) +
               ByteVector::fromShort(item.toIntPair().second) +
               ByteVector(2, '\0'));
-  return renderData(name, 0x15, data);
+  return renderData(name, 0x00, data);
 }
 
 ByteVector
@@ -280,7 +280,7 @@
   data.append(ByteVector(2, '\0') +
               ByteVector::fromShort(item.toIntPair().first) +
               ByteVector::fromShort(item.toIntPair().second));
-  return renderData(name, 0x15, data);
+  return renderData(name, 0x00, data);
 }
 
 ByteVector


Index: taglib.spec
===================================================================
RCS file: /cvs/pkgs/rpms/taglib/devel/taglib.spec,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -p -r1.49 -r1.50
--- taglib.spec	6 Nov 2009 12:21:47 -0000	1.49
+++ taglib.spec	26 Jan 2010 20:37:10 -0000	1.50
@@ -12,7 +12,7 @@
 
 Name:       taglib	
 Version:    1.6.1
-Release:    2%{?dist}
+Release:    3%{?dist}
 Summary:    Audio Meta-Data Library
 
 Group: 	    System Environment/Libraries
@@ -31,6 +31,7 @@ Patch1:     taglib-1.5b1-multilib.patch 
 Patch2:     taglib-1.5rc1-multilib.patch
 
 Patch3: taglib-1.6.1-20091103.patch
+Patch4: taglib-1.6.1-20100126.patch
 
 BuildRequires: cmake
 BuildRequires: pkgconfig
@@ -85,6 +86,7 @@ Files needed when building software with
 %patch2 -p1 -b .multilib
 
 %patch3 -p1 -b .20091103
+%patch4 -p1 -b .20100126
 
 
 %build
@@ -157,6 +159,10 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Tue Jan 26 2010 Michael Schwendt <mschwendt at fedoraproject.org> - 1.6.1-3
+- Update with four post-1.6.1 fixes from 20100126
+  (r1056922, r1062026, r1062426, r1078611).
+
 * Fri Nov  6 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 1.6.1-2
 - Update with two post-1.6.1 changes from 20091103.
 



More information about the scm-commits mailing list