Bug#619723: cdrdao extits with ".cue:14: Timecode out of range"

Tanguy Ortolo tanguy+debian at ortolo.eu
Thu Nov 10 17:04:49 UTC 2011


Hello.

Alexander Kurtz, 2011-06-14 15:56 UTC+0200:
> As you can see, the second track starts at 00:09:75. However, since
> there are only 75 frames per second[1], starting at frame #75 is
> invalid. The correct start time would be 00:10:00.

I have identified the code which is involved here. It is
plugins/audio2cue/burn-audio2cue.c:308-320,
>> static gchar *
>> brasero_audio2cue_len_to_string (guint64 len)
>> {
>>     int sec;
>>     int min;
>>     guint64 frame;
>> 
>>     if (len >= 1000000000LL)
>>         frame = (len % 1000000000LL) * 75;
>>     else
>>         frame = len * 75;
>> 
>>     frame = frame / 1000000000 + ((frame % 1000000000LL) ? 1:0);

In the following analysis, I shall substract 300 to the line numbers for
simplification, so consider the first line is #8.

len seems to be a duration in nanoseconds. The control structure ll.
15-18, stores 75 times the rest of its division by one second into
frame. This is done only if len is greater or equal to one second, but
this condition is pointless since if it is strictly lower (by the way, I
think it should be removed for clarity), then this rest is equal to len
anyway.

So now, frame contain the nano-frame number, between 0 included and 75e9
excluded. L. 20, it is divided by a billion to get the frame number and
it is added one if it was an exact frame. The result is thus between 0
and 75 *included*, equal to 75 in the cases where (len % 1e9) * 75 ==
74e9.

I must be missing something since I think this case never happens, but I
am really not an expect in C so I am not sure of this divisions'
behaviour. Anyway, this is where the problem is. I shall give it a more
precise look, but do not hesitate to comment or correct my analysis.

Regards,

-- 
 ,--.
: /` )   Tanguy Ortolo <xmpp:tanguy at ortolo.eu> <irc://irc.oftc.net/Elessar>
| `-'    Debian Maintainer
 \_
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20111110/5a904c0f/attachment-0001.pgp>


More information about the pkg-gnome-maintainers mailing list