Tanguy Ortolo, 2011-11-10 23:53 UTC+0100: > The attached C program allows to demonstrate it: > $ ./test 999999999 # this is one second minus one nanosecond > 0 0:0:75 > > […] > > If you agree with this solution, here is a quilt patch that implements > it.
Oops, forgot to attach these files. Here they are. -- ,--. : /` ) Tanguy Ortolo <xmpp:tan...@ortolo.eu> <irc://irc.oftc.net/Elessar> | `-' Debian Maintainer \_
#include <stdio.h> #include <stdlib.h> int main(int argc, char** argv) { long long len; long long frame; int sec; int min; if (argc != 2) { return 1; } len = atoll(argv[1]); if (len >= 1000000000LL) frame = (len % 1000000000LL) * 75; else frame = len * 75; frame = frame / 1000000000 + ((frame % 1000000000LL) ? 1:0); //frame = frame / 1000000000; len /= 1000000000LL; min = len / 60; sec = len % 60; printf("%lli %i:%i:%lli\n", len, min, sec, frame); return 0; }
Description: Avoid generating invalid frame number 75 The conditional increment to the frame number, which is probably meant to avoid loosing the last incomplete frame in the very last track of a disk, has the side effect of generating frame numbers equal to 75, when they should be between 0 and 74 included, which results in an unburnable image. . While the code could be adapted to count the last frame, it is clearer and less intrusive to the original code to simply remove the conditional increment, and possibily loosing 1/75th a second on the very last track should not matter to anyone. Author: Tanguy Ortolo <tanguy+deb...@ortolo.eu> Last-Update: 2011-11-10 Index: brasero-3.0.0/plugins/audio2cue/burn-audio2cue.c =================================================================== --- brasero-3.0.0.orig/plugins/audio2cue/burn-audio2cue.c 2010-08-16 04:55:07.000000000 +0200 +++ brasero-3.0.0/plugins/audio2cue/burn-audio2cue.c 2011-11-10 23:44:10.232078473 +0100 @@ -317,7 +317,7 @@ else frame = len * 75; - frame = frame / 1000000000 + ((frame % 1000000000LL) ? 1:0); + frame = frame / 1000000000; len /= 1000000000LL; min = len / 60;
signature.asc
Description: Digital signature