libcdio-devel
[Top][All Lists]
Advanced

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

[Libcdio-devel] CD-Text patches


From: Leon Merten Lohse
Subject: [Libcdio-devel] CD-Text patches
Date: Thu, 14 Apr 2016 08:49:11 +0200

As of 9 hours ago, I pushed the branch cdtext-testing into libcdio git.

It contains the patch I proposed earlier and 4 additional commits.

1) Interpretation of TAB characters, as discussed earlier on the list

2) Avoid a buffer overflow in the CD-Text parser, which could occur
when single text fields are longer than 254 bytes - the spec allows
for ~160

3) Store the min and max track numbers in the cdtext struct and add
public api functions to access them.
Also export the function to parse cdtext from the binary format. The
latter is useless without the track numbers.

4) Add a new example to demonstrate the new api functions.

My idea behind 3) and 4) is that a standalone CD-Text parser might be
useful to some people and access to the parser functions allows
implementing a test case that only tests this function and does not
depend on the cue sheet parser. 

Item 3) includes this diff:
--- a/lib/driver/cdtext_private.h
+++ b/lib/driver/cdtext_private.h
@@ -116,6 +116,8 @@ struct cdtext_block_s {
   cdtext_genre_t genre_code;   /**< genre code of the disc */
   cdtext_lang_t  language_code;/**< language of this block */ 
   bool           copyright;    /**< CD-TEXT copyright      */
+  track_t        first_track;  /**< first track number     */
+  track_t        last_track;   /**< last track number      */ 
};
 
This should not change the ABI though, because cdtext_block_s is not
exported.

The test cases are also in the works and only need a little
more polishing.

Best regards
Leon




reply via email to

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