From: epg <> Date: Sat, 23 Oct 2004 02:40:41 +0000 (+0000) Subject: Ah-hah! I have finally found the bug that caused my mp3s to include a X-Git-Url: https://diplodocus.org/git/flac-archive/commitdiff_plain/edc038965868bb01232f8a16f4926dff28e29862?ds=inline Ah-hah! I have finally found the bug that caused my mp3s to include a 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! --- diff --git a/flac2mp3 b/flac2mp3 index 3fc6bf4..abd8984 100755 --- a/flac2mp3 +++ b/flac2mp3 @@ -25,10 +25,7 @@ use warnings; 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 {