debian/0000755000000000000000000000000011635364670007201 5ustar debian/watch0000644000000000000000000000022011635363473010224 0ustar version=3 http://search.cpan.org/dist/Ogg-Vorbis-Header-PurePerl/ .+/Ogg-Vorbis-Header-PurePerl-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ debian/rules0000755000000000000000000000027611635364600010257 0ustar #!/usr/bin/make -f TMP=$(CURDIR)/debian/libogg-vorbis-header-pureperl-perl %: dh $@ override_dh_auto_install: dh_auto_install rm -f $(TMP)/usr/share/perl5/Ogg/Vorbis/Header/ogginfo.pl debian/changelog0000644000000000000000000000571311635364670011061 0ustar libogg-vorbis-header-pureperl-perl (1.0-3) unstable; urgency=low [ Ryan Niebur ] * Remove Florian Ragwitz from Uploaders (Closes: #523231) [ Nathan Handler ] * debian/watch: Update to ignore development releases. [ Ansgar Burchardt ] * Update my email address. * debian/control: Convert Vcs-* fields to Git. * Use source format 3.0 (quilt). * debian/copyright: Formatting changes. * Make build-dep on perl unversioned. * Use tiny debian/rules with debhelper 8. * Bumped Standards-Version to 3.9.2. -- Ansgar Burchardt Sun, 18 Sep 2011 14:53:09 +0200 libogg-vorbis-header-pureperl-perl (1.0-2) unstable; urgency=low * Add patch tracklength.patch to deal with short ogg files (closes: #522075) and with ogg files where the magic header is further to the beginning of the file. Add debian/README.source and quilt framework. * Set Standards-Version to 3.8.1 (no changes). * Add /me to Uploaders. * debian/copyright: adjust years of packaging copyright. -- gregor herrmann Wed, 01 Apr 2009 23:49:12 +0200 libogg-vorbis-header-pureperl-perl (1.0-1) unstable; urgency=low [ gregor herrmann ] * Take over for the Debian Perl Group with maintainer's permission (http://lists.debian.org/debian-perl/2008/06/msg00039.html) * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser field (source stanza); Homepage field (source stanza). Changed: Maintainer set to Debian Perl Group (was: Florian Ragwitz ); Florian Ragwitz moved to Uploaders. * Add debian/watch. [ Ansgar Burchardt ] * New upstream release. + remove patches/10comment_tags.dpatch: Fixed upstream in a different way + remove patches/20tracklength.dpatch: Not applied upstream, but new code should be faster. * Remove patch system. * Refresh debian/rules for debhelper 7. * Convert debian/copyright to proposed machine-readable format. * Add myself to Uploaders. * debian/control: Bump Standards-Version to 3.8.0 -- Ansgar Burchardt Sat, 22 Nov 2008 21:46:53 +0100 libogg-vorbis-header-pureperl-perl (0.07-2.1) unstable; urgency=low * Non-maintainer upload. * Fix FTBFS with Perl 5.10. Closes: #467995 -- Mark Hymers Sat, 05 Apr 2008 21:09:16 +0100 libogg-vorbis-header-pureperl-perl (0.07-2) unstable; urgency=low * Applied patch from Jeff King to remove duplicates from comment_tags (Closes: #295238). * Applied patch from Jeff King to make the calculation of the tracklength optional to increase performance (Closes: #295240) * Added dpatch Build-Dep. -- Florian Ragwitz Thu, 14 Apr 2005 16:30:44 +0200 libogg-vorbis-header-pureperl-perl (0.07-1) unstable; urgency=low * Initial Release. -- Florian Ragwitz Wed, 15 Sep 2004 06:36:03 +0200 debian/control0000644000000000000000000000221311635364632010600 0ustar Source: libogg-vorbis-header-pureperl-perl Section: perl Priority: optional Maintainer: Debian Perl Group Uploaders: Ansgar Burchardt , gregor herrmann Build-Depends: debhelper (>= 8) Build-Depends-Indep: perl Standards-Version: 3.9.2 Homepage: http://search.cpan.org/dist/Ogg-Vorbis-Header-PurePerl/ Vcs-Git: git://git.debian.org/pkg-perl/packages/libogg-vorbis-header-pureperl-perl.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libogg-vorbis-header-pureperl-perl.git Package: libogg-vorbis-header-pureperl-perl Architecture: all Depends: ${perl:Depends}, ${misc:Depends} Description: pure Perl interface to Ogg Vorbis information fields Ogg::Vorbis::Header::PurePerl is an object-oriented interface to Ogg Vorbis information and comment fields, implemented entirely in Perl. Intended to be a drop in replacement for Ogg::Vobis::Header. . Unlike Ogg::Vorbis::Header, this module will go ahead and fill in all of the information fields as soon as you construct the object. In other words, the new and load constructors have identical behavior. debian/compat0000644000000000000000000000000211635364605010375 0ustar 8 debian/source/0000755000000000000000000000000011635364407010477 5ustar debian/source/format0000644000000000000000000000001411635364407011705 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000011635363473010630 5ustar debian/patches/tracklength.patch0000644000000000000000000000346311635363473014165 0ustar Authors: gregor herrmann , Damyan Ivanov Description: - if the file is shorter than blocksize_0, the seek/read returns an empty $buf later - check for blocksize_0 is we are interested in blocksize_0 - seek (sic!) harder if OGGHEADERFLAG is not within $len Bugs: #522075, CPAN RT#43693 --- a/PurePerl.pm +++ b/PurePerl.pm @@ -421,30 +421,44 @@ sub _calculateTrackLength { if (($data->{'filesize'} - $data->{'INFO'}{'offset'}) > ($data->{'INFO'}{'blocksize_0'} * 2)) { $len = $data->{'INFO'}{'blocksize_0'} * 2; + } elsif ($data->{'filesize'} < $data->{'INFO'}{'blocksize_0'}) { + $len = $data->{'filesize'}; } else { $len = $data->{'INFO'}{'blocksize_0'}; } - if ($len == 0) { + if ($data->{'INFO'}{'blocksize_0'} == 0) { print "Ogg::Vorbis::Header::PurePerl:\n"; warn "blocksize_0 is 0! Should be a power of 2! http://www.xiph.org/ogg/vorbis/doc/vorbis-spec-ref.html\n"; return; } seek($fh, -$len, 2); - read($fh, my $buf, $len); + my $buf = ''; my $foundHeader = 0; + my $block = $len; - for (my $i = 0; $i < $len; $i++) { + SEEK: + while ($foundHeader == 0 && read($fh, $buf, $len)) { + # search the last read $block bytes for Ogg header flag + # the search is conducted backwards so that the last flag + # is found first + for (my $i = $block; $i >= 0; $i--) { + if (substr($buf, $i, 4) eq OGGHEADERFLAG) { + substr($buf, 0, ($i+4), ''); + $foundHeader = 1; + last SEEK; + } + } - last if length($buf) < 4; + # already read the whole file? + last if $len == $data->{'filesize'}; - if (substr($buf, $i, 4) eq OGGHEADERFLAG) { - substr($buf, 0, ($i+4), ''); - $foundHeader = 1; - last; - } + $len += $block; + $len = $data->{'filesize'} if $len > $data->{'filesize'}; + + seek($fh, -$len, 2); } unless ($foundHeader) { debian/patches/series0000644000000000000000000000002211635363473012037 0ustar tracklength.patch debian/libogg-vorbis-header-pureperl-perl.examples0000644000000000000000000000001311635363473017522 0ustar ogginfo.pl debian/copyright0000644000000000000000000000164311635364471011137 0ustar Format-Specification: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?view=markup&pathrev=59 Name: Ogg-Vorbis-Header-PurePerl Maintainer: Dan Sully Source: http://search.cpan.org/dist/Ogg-Vorbis-Header-PurePerl/ Files: * Copyright: 2003, Andrew Molloy 2005-2008, Dan Sully License: GPL-2+ Files: debian/* Copyright: 2004-2005, Florian Ragwitz 2008, Mark Hymers 2008-2009, gregor herrmann 2008-2011, Ansgar Burchardt License: GPL-2+ License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . On Debian systems, the complete text of version 2 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'.