Reporting line number in case of cue sheet file problems

This commit is contained in:
Thomas Schmitt 2012-01-02 14:37:35 +00:00
parent 4c9783d7ae
commit c851520684
3 changed files with 12 additions and 2 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2012.01.01.173446"
#define Cdrskin_timestamP "2012.01.02.143655"

View File

@ -591,6 +591,7 @@ Range "scdbackup" : 0x00020000 to 0x0002ffff
0x00020196 (FAILURE,HIGH) = Session has already defined tracks
0x00020197 (FAILURE,HIGH) = Unsupported text input file feature
0x00020198 (FAILURE,HIGH) = CD-TEXT pack file readability problem
0x00020199 (SORRY,HIGH) = Text input file reading aborted
libdax_audioxtr:

View File

@ -1697,6 +1697,7 @@ int burn_session_by_cue_file(struct burn_session *session, char *path,
unsigned char **text_packs, int *num_packs, int flag)
{
int ret, num_tracks, i, pack_type, length, double_byte = 0;
int line_counter = 0;
struct burn_track **tracks;
char *msg = NULL, *line = NULL;
unsigned char *payload;
@ -1766,10 +1767,18 @@ cannot_open:;
burn_printify(msg), 0, 0);
ret = 0; goto ex;
}
line_counter++;
ret = cue_interpret_line(session, line, crs, 0);
if (ret <= 0)
if (ret <= 0) {
sprintf(msg,
"Cue sheet file '%.4000s': Reading aborted after line %d",
path, line_counter);
libdax_msgs_submit(libdax_messenger, -1, 0x00020199,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
burn_printify(msg), 0, 0);
goto ex;
}
}
/* Attach last track to session */
if (crs->track != NULL) {