- Fix a bug in id3lib that causes UTF-16 characters to be broken when writing

tags
- Pass maintainer-ship to submitter

PR:		98061
Submitted by:	Khairil Yusof <kaeru@inigo-tech.com>
Obtained from:	Fedora (CVS)
This commit is contained in:
Emanuel Haupt 2006-05-30 13:50:27 +00:00
parent 16d04bc26b
commit 7c0b707e71
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=163968
2 changed files with 17 additions and 3 deletions

View File

@ -7,16 +7,16 @@
PORTNAME= id3lib
PORTVERSION= 3.8.3
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= ports@FreeBSD.org
MAINTAINER= kaeru@inigo-tech.com
COMMENT= Library for manipulating ID3v1/v1.1 and ID3v2 tags
USE_ICONV= yes
GNU_CONFIGURE= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
INSTALLS_SHLIB= yes

View File

@ -0,0 +1,14 @@
--- src/io_helpers.cpp.orig Sun Mar 2 07:23:00 2003
+++ src/io_helpers.cpp Mon May 29 01:23:33 2006
@@ -363,9 +363,10 @@
// Write the BOM: 0xFEFF
unicode_t BOM = 0xFEFF;
writer.writeChars((const unsigned char*) &BOM, 2);
+ const unsigned char* pdata = (const unsigned char*)data.c_str();
for (size_t i = 0; i < size; i += 2)
{
- unicode_t ch = (data[i] << 8) | data[i+1];
+ unicode_t ch = (pdata[i] << 8) | pdata[i+1];
writer.writeChars((const unsigned char*) &ch, 2);
}
}