r27055 - in /branches/upstream/libaudio-flac-header-perl/current: Changes Header.pm Header.xs META.yml README

rmayorga-guest at users.alioth.debian.org rmayorga-guest at users.alioth.debian.org
Sat Nov 22 07:21:22 UTC 2008


Author: rmayorga-guest
Date: Sat Nov 22 07:21:19 2008
New Revision: 27055

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=27055
Log:
[svn-upgrade] Integrating new upstream version, libaudio-flac-header-perl (2.3)

Modified:
    branches/upstream/libaudio-flac-header-perl/current/Changes
    branches/upstream/libaudio-flac-header-perl/current/Header.pm
    branches/upstream/libaudio-flac-header-perl/current/Header.xs
    branches/upstream/libaudio-flac-header-perl/current/META.yml
    branches/upstream/libaudio-flac-header-perl/current/README

Modified: branches/upstream/libaudio-flac-header-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-flac-header-perl/current/Changes?rev=27055&op=diff
==============================================================================
--- branches/upstream/libaudio-flac-header-perl/current/Changes (original)
+++ branches/upstream/libaudio-flac-header-perl/current/Changes Sat Nov 22 07:21:19 2008
@@ -1,4 +1,7 @@
 Revision history for Perl extension Audio::FLAC.
+
+2.3  Sat Nov  8 15:36:38 PST 2008
+	- Patch from Nick Hall to fix allpictures XS & Debian crash.
 
 2.2  Sat May 17 00:42:06 PDT 2008
 	- Patches from Nick Hall to allow allpictures XS partity & multiple ID3 tag fixes

Modified: branches/upstream/libaudio-flac-header-perl/current/Header.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-flac-header-perl/current/Header.pm?rev=27055&op=diff
==============================================================================
--- branches/upstream/libaudio-flac-header-perl/current/Header.pm (original)
+++ branches/upstream/libaudio-flac-header-perl/current/Header.pm Sat Nov 22 07:21:19 2008
@@ -1,11 +1,11 @@
 package Audio::FLAC::Header;
 
-# $Id: Header.pm 25 2008-05-31 20:00:44Z dsully $
+# $Id: Header.pm 26 2008-11-08 23:37:45Z dsully $
 
 use strict;
 use File::Basename;
 
-our $VERSION = '2.2';
+our $VERSION = '2.3';
 our $HAVE_XS = 0;
 
 # First four bytes of stream are always fLaC
@@ -171,8 +171,14 @@
 		return $self->{'allpictures'} if exists($self->{'allpictures'});
 	}
 
+	# Also look for other types of images
+	# http://flac.sourceforge.net/format.html#metadata_block_picture
+	my @types = ($type, 4, 0, 5..20);
+
 	# if the picture block exists, return it's content
-	return $self->{'picture'}->{$type} if exists($self->{'picture'}->{$type});
+	for (@types) {
+		return $self->{'picture'}->{$_} if exists $self->{'picture'}->{$_};
+	}
 
 	# otherwise, return nothing
 	return undef;

Modified: branches/upstream/libaudio-flac-header-perl/current/Header.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-flac-header-perl/current/Header.xs?rev=27055&op=diff
==============================================================================
--- branches/upstream/libaudio-flac-header-perl/current/Header.xs (original)
+++ branches/upstream/libaudio-flac-header-perl/current/Header.xs Sat Nov 22 07:21:19 2008
@@ -56,11 +56,10 @@
 void _read_metadata(HV *self, char *path, FLAC__StreamMetadata *block, unsigned block_number) {
 
 	unsigned i;
-	int j;
 	int storePicture = 0;
 
 	HV *pictureContainer = newHV();
-	AV *allpicturesContainer = newAV();
+	AV *allpicturesContainer = NULL;
 
 	switch (block->type) {
 
@@ -193,15 +192,13 @@
 					if (hv_exists(self, "separator", 9)) {
 						separator = hv_fetch(self, "separator", 9, 0);
 						sv_catsv(*tag, *separator);
-					}
-					else {
+					} else {
 						sv_catpv(*tag, "/");
 					}
 
 					/* concatenate with the new entry */
 					sv_catpv(*tag, half + 1);
-				}
-				else {
+				} else {
 					hv_store(tags, entry, half - entry, newSVpv(half + 1, 0), 0);
 				}
 			}
@@ -315,10 +312,19 @@
 				newRV_noinc((SV*) picture)
 			);
 
+			storePicture = 1;
+
 			/* update allpictures */
+			if (hv_exists(self, "allpictures", 11)) {
+				allpicturesContainer = (AV *) SvRV(*my_hv_fetch(self, "allpictures")); 
+			} else {
+				allpicturesContainer = newAV();
+
+				/* store the 'allpictures' array */
+				my_hv_store(self, "allpictures", newRV_noinc((SV*) allpicturesContainer));
+                        }
+
 			av_push(allpicturesContainer, (SV*) newRV((SV*) picture));
-
-			storePicture = 1;
 
 			break;
 		}
@@ -330,9 +336,6 @@
 	}
 
 	if (storePicture) {
-		/* store the 'allpictures' array */
-		my_hv_store(self, "allpictures", newRV_noinc((SV*) allpicturesContainer));
-
 		/* store the 'picture' hash */
 		if (hv_scalar(pictureContainer)) {
 			my_hv_store(self, "picture", newRV_noinc((SV*) pictureContainer));
@@ -635,7 +638,7 @@
 		FLAC__ASSERT(FLAC__metadata_iterator_get_block(iterator) == block);
 	}
 
-	FLAC__StreamMetadata_VorbisComment_Entry entry;
+	FLAC__StreamMetadata_VorbisComment_Entry entry = { 0 };
 	FLAC__metadata_object_vorbiscomment_append_comment(block, entry, /*copy=*/true);
 
 	if (hv_iterinit(tags)) {

Modified: branches/upstream/libaudio-flac-header-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-flac-header-perl/current/META.yml?rev=27055&op=diff
==============================================================================
--- branches/upstream/libaudio-flac-header-perl/current/META.yml (original)
+++ branches/upstream/libaudio-flac-header-perl/current/META.yml Sat Nov 22 07:21:19 2008
@@ -14,4 +14,4 @@
     - t
 requires: 
   perl: 5.005
-version: 2.2
+version: 2.3

Modified: branches/upstream/libaudio-flac-header-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-flac-header-perl/current/README?rev=27055&op=diff
==============================================================================
--- branches/upstream/libaudio-flac-header-perl/current/README (original)
+++ branches/upstream/libaudio-flac-header-perl/current/README Sat Nov 22 07:21:19 2008
@@ -1,4 +1,4 @@
-Audio::FLAC version 2.2
+Audio::FLAC version 2.3
 =======================
 
 The README is used to introduce the module and provide instructions on




More information about the Pkg-perl-cvs-commits mailing list