Your message dated Wed, 18 Mar 2009 07:17:16 +0000
with message-id <[email protected]>
and subject line Bug#506193: fixed in toolame 02l-7
has caused the Debian Bug report #506193,
regarding toolame: Encoded files are sometimes corrupted (bad 'padding'
information)
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
506193: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=506193
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: toolame
Version: 02l-6
Severity: important
Tags: patch
Hello,
When encoding a mono/16-bit/48kHz WAV file, the resulting file is
sometimes corrupted in the 'padding' information of the headers, which
renders it unplayable by a decoder:
% file test.wav
test.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono
48000 Hz
% toolame test.wav
Parsing Wave File Header
>>> 48000 Hz sampling freq selected
>>> Input Wave File is Mono
--------------------------------------------
Input File : 'test.wav' 48.0 kHz
Output File: 'test.mp2'
192 kbps MPEG-1 Layer II single-ch Psycho model=1 (Mode_Extension=0)
[De-emph:Off Copyright:No Original:No CRC:Off]
[Padding:Normal Byte-swap:Off Chanswap:Off DAB:Off]
ATH adjustment 0.000000
--------------------------------------------
encode_init: using tablenum 0 with sblimit 27
Hit end of audio data
Avg slots/frame = 576.000; b/smp = 4.00; bitrate = 192.000 kbps
Done
% od -Ax -tx1 test.mp2 | head -1
000000 ff fd a6 c0 55 68 88 87 77 8d f6 b6 22 00 00 ee
^^
--> Incorrect (padding is ON)
(...)
% toolame test.wav
Parsing Wave File Header
>>> 48000 Hz sampling freq selected
>>> Input Wave File is Mono
--------------------------------------------
Input File : 'test.wav' 48.0 kHz
Output File: 'test.mp2'
192 kbps MPEG-1 Layer II single-ch Psycho model=1 (Mode_Extension=0)
[De-emph:Off Copyright:No Original:No CRC:Off]
[Padding:Normal Byte-swap:Off Chanswap:Off DAB:Off]
ATH adjustment 0.000000
--------------------------------------------
encode_init: using tablenum 0 with sblimit 27
Hit end of audio data
Avg slots/frame = 576.000; b/smp = 4.00; bitrate = 192.000 kbps
Done
% od -Ax -tx1 test.mp2 | head -1
000000 ff fd a4 c0 55 68 88 87 77 8d f6 b6 22 00 00 ee
^^
--> Correct (padding is OFF)
(See for example http://www.mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm
for the header details.)
Tracking this problem down, it appears that the 1-bit 'header->padding'
field is not initialized before parsing the arguments, and if no
argument changes this field, it is left unitialized, resulting in a
possible corruption.
The attached patch initializes the field to 0 before parsing the
arguments.
It seems that the problem does not appear with the (more common) 44.1
kHz sampling rate. My guess, after browsing through the source, is that
in that case, sizes of packets are such that the encoder has to set the
padding field for each packet, whereas with 48 kHz, all packets are the
same size, and the encoder uses the unitialized value throughout the
whole output file.
By the way, I recently became aware of the 'twolame' package, which
is a fork of 'toolame'. A quick test with it seems to show that this bug
(as well as the previous one I reported, #504308) is not present in
it. Should 'toolame' then be considered obsoleted by 'twolame'?
Thanks and best regards,
-Christian
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1,
'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.27.6-mooch.1-amd64 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL
set to en_US.UTF8)
Shell: /bin/sh linked to /bin/bash
Versions of packages toolame depends on:
ii libc6 2.7-16 GNU C Library: Shared libraries
toolame recommends no packages.
toolame suggests no packages.
-- no debconf information
diff -ru toolame-02l.orig/toolame.c toolame-02l/toolame.c
--- toolame-02l.orig/toolame.c 2008-11-02 19:01:25.000000000 +0100
+++ toolame-02l/toolame.c 2008-11-15 10:15:00.000000000 +0100
@@ -644,6 +644,7 @@
inPath[0] = '\0';
outPath[0] = '\0';
header->lay = DFLT_LAY;
+ header->padding = 0;
switch (DFLT_MOD) {
case 's':
header->mode = MPG_MD_STEREO;
Binary files toolame-02l.orig/toolame.o and toolame-02l/toolame.o differ
--- End Message ---
--- Begin Message ---
Source: toolame
Source-Version: 02l-7
We believe that the bug you reported is fixed in the latest version of
toolame, which is due to be installed in the Debian FTP archive:
toolame_02l-7.diff.gz
to pool/main/t/toolame/toolame_02l-7.diff.gz
toolame_02l-7.dsc
to pool/main/t/toolame/toolame_02l-7.dsc
toolame_02l-7_i386.deb
to pool/main/t/toolame/toolame_02l-7_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Fabian Greffrath <[email protected]> (supplier of updated toolame
package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Mon, 16 Mar 2009 14:35:12 +0100
Source: toolame
Binary: toolame
Architecture: source i386
Version: 02l-7
Distribution: unstable
Urgency: low
Maintainer: Debian multimedia packages maintainers
<[email protected]>
Changed-By: Fabian Greffrath <[email protected]>
Description:
toolame - MPEG-1 layer 2 audio encoder
Closes: 504308 506193
Changes:
toolame (02l-7) unstable; urgency=low
.
* debian/control:
+ Added Build-Depends on quilt.
+ Bumped Standards-Version to 3.8.0.
+ Removed the "XS-" prefix from the Vcs-Svn and Vcs-Browser fields.
+ Added Homepage field and removed it from the package description.
+ Fixed "binary-control-field-duplicates-source field".
* debian/rules:
+ Included quilt for patch management.
+ Fixed "debian-rules-ignores-make-clean-error".
* debian/patches/01-WAV-header-read-incorrectly-on-64-bit-platforms.patch:
+ New patch to fix usage of "unsigned long" on 64-bit little-endian
platforms (Closes: #504308).
+ Thanks Christian Grigis <[email protected]>!
*
debian/patches/02-initialize-header-padding-field-before-parsing-arguments.patch:
+ New patch to initialize the 1-bit 'header->padding' field before parsing
the arguments (Closes: #506193).
+ Thanks Christian Grigis <[email protected]>!
Checksums-Sha1:
0ae3cd21a6dab5db851f2cc38f05f22e5a23da6b 1285 toolame_02l-7.dsc
da39c3285cca247ba3717872f42f04a4e0235016 6077 toolame_02l-7.diff.gz
589ccfcdf801fbae3affe5f6b6877e1bd8144377 91832 toolame_02l-7_i386.deb
Checksums-Sha256:
d2f7e84746b4daaa8624b4be08e6f10abdf7ec2f5016ee0a6a55eda027263084 1285
toolame_02l-7.dsc
421c6d01bc23a9ab92cfe905e09d64f6bfba2f5b26439d9b05cf773246bf5476 6077
toolame_02l-7.diff.gz
b40b9581233184bc94f1fd6f0f428f5168150ac03cba7033eeda9f8808337f93 91832
toolame_02l-7_i386.deb
Files:
fd40a0576ed47b22411c57db4de325ed 1285 sound optional toolame_02l-7.dsc
23f5c212a5112a06ec112a12b6baa683 6077 sound optional toolame_02l-7.diff.gz
ef9702f651b379bc9571f3cd9a8793ea 91832 sound optional toolame_02l-7_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Debian Powered!
iJwEAQECAAYFAknAm9kACgkQ78RAoABp8o9LwAP/WAfwqHZL4IWeJkPyZtJqUJeV
/YDHDyIva0nE3mDst5k5G3eEjZaS92rIhp/7ajP7EyGt022JWKakvVPb1nu4sPrQ
77WtvowgRoTBEGJJteF45GRUhkbm0bvj5npUD1wy9uj41VDDxGtdOKUeoNJVflF6
cTWU85f+znwnnCxjsnA=
=lnOH
-----END PGP SIGNATURE-----
--- End Message ---