]> diplodocus.org Git - flac-archive/commitdiff
Ah-hah! I have finally found the bug that caused my mp3s to include a
authorepg <>
Sat, 23 Oct 2004 02:40:41 +0000 (02:40 +0000)
committerepg <>
Sat, 23 Oct 2004 02:40:41 +0000 (02:40 +0000)
bit of the next track at the end of one, but only sometimes.  The
hundredths of a second vs. sector was certainly a bug, but was not
this bug.

(get_decode_args): Use sprintf %02d for each field.  Previously i
was just stringing them together with colon and dot, so "9" becomes
"9" instead of "09", which flac sees as 90!

flac2mp3

index 3fc6bf4..abd8984 100755 (executable)
--- a/flac2mp3
+++ b/flac2mp3
@@ -25,10 +25,7 @@ use warnings;
 use Pod::Usage;
 
 sub tformat {
 use Pod::Usage;
 
 sub tformat {
-    my $min = shift;
-    my $sec = shift;
-    my $hun = shift;
-    return "$min:$sec.$hun";
+    return sprintf('%02d:%02d.%02d', @_);
 }
 
 sub get_decode_args {
 }
 
 sub get_decode_args {