libcdio-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libcdio-devel] Read Sub-channel changes


From: Leon Merten Lohse
Subject: Re: [Libcdio-devel] Read Sub-channel changes
Date: Tue, 31 May 2016 21:20:53 +0200

On Tue, 31 May 2016 21:03:09 +0200
"Thomas Schmitt" <address@hidden> wrote:

> - Leon should have a look at
>     
> http://git.savannah.gnu.org/gitweb/?p=libcdio.git;a=commitdiff;h=0f9fe770268bc74e571c999e67b74d4968d0e835
>   and judge whether
>     +  if (i_cdtext > CDTEXT_LEN_BINARY_MAX + 2)
>   and following lines are really correct. It seems inconsistent and it
>   has the "2" with a different sign than in the replaced code snippet.

Yes, this is incorrect.
It should be

 i_cdtext = CDTEXT_LEN_BINARY_MAX + 4;

instead of

 i_cdtext = CDTEXT_LEN_BINARY_MAX + 2;

to be consistent. Thanks for pointing that out.
The value in the READ SUB-CHANNEL header gives the length of the actual
CD-Text payload plus 2 of the 4 header bytes. CDTEXT_LEN_BINARY_MAX
should hold the maximal size of the CD-Text payload (since it is
divisible by 18). I am not entirely sure anymore, from where I got the
value of 9216..
I think that the old code was also not entirely correct.
However, this is only a safeguard against bad data. No real disc has
this much CD-Text.

Best regards
Leon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]