Fixed that CD-Text from cdrdao toc was shifted one track forward.

This commit is contained in:
Leon Merten Lohse
2012-03-27 17:45:09 +02:00
parent d7d488f816
commit 3940726aa7
3 changed files with 103 additions and 105 deletions

View File

@@ -80,7 +80,8 @@ print_disc_info(CdIo_t *p_cdio) {
if(cdtext_select_language(cdtext, EXAMPLE_PREF_LANG)) {
printf("%s selected.\n", cdtext_lang2str (EXAMPLE_PREF_LANG));
} else {
printf("'%s' is not available. Using '%s'\n", EXAMPLE_PREF_LANG,
printf("'%s' is not available. Using '%s'\n",
cdtext_lang2str (EXAMPLE_PREF_LANG),
cdtext_lang2str (cdtext_get_language (cdtext)));
}
@@ -88,7 +89,7 @@ print_disc_info(CdIo_t *p_cdio) {
printf("CD-Text for Disc:\n");
print_cdtext_track_info(cdtext, 0);
for (i=i_first_track ; i < i_last_track; i++ ) {
printf("CD-Text for Track %d\n:", i);
printf("CD-Text for Track %d:\n", i);
print_cdtext_track_info(cdtext, i);
}
}

View File

@@ -937,9 +937,6 @@ parse_tocfile (_img_private_t *cd, const char *psz_cue_name)
} else if (0 == strcmp ("LANGUAGE_MAP", psz_keyword)) {
/* LANGUAGE d { ... } */
} else if (0 == strcmp ("LANGUAGE", psz_keyword)) {
if (NULL == (psz_field = strtok (NULL, " \t\n\r"))) {
goto format_error;
}
/* Language number */
if (NULL == (psz_field = strtok (NULL, " \t\n\r"))) {
goto format_error;
@@ -960,7 +957,7 @@ parse_tocfile (_img_private_t *cd, const char *psz_cue_name)
cd->gen.cdtext->block[cd->gen.cdtext->block_i].language_code = CDTEXT_LANGUAGE_ENGLISH;
}
cdtext_set (cd->gen.cdtext, cdtext_key, (uint8_t*) strtok (NULL, "\"\t\n\r"),
(-1 == i ? 0 : cd->gen.i_first_track + i + 1),
(-1 == i ? 0 : cd->gen.i_first_track + i),
"ISO-8859-1");
}