From c851520684be7478d7817f9c7bd4545ad967a3b4 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 2 Jan 2012 14:37:35 +0000 Subject: [PATCH] Reporting line number in case of cue sheet file problems --- cdrskin/cdrskin_timestamp.h | 2 +- libburn/libdax_msgs.h | 1 + libburn/structure.c | 11 ++++++++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 61b293d..5df841e 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2012.01.01.173446" +#define Cdrskin_timestamP "2012.01.02.143655" diff --git a/libburn/libdax_msgs.h b/libburn/libdax_msgs.h index c093291..f0627c6 100644 --- a/libburn/libdax_msgs.h +++ b/libburn/libdax_msgs.h @@ -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: diff --git a/libburn/structure.c b/libburn/structure.c index 4277843..2bd9b14 100644 --- a/libburn/structure.c +++ b/libburn/structure.c @@ -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,9 +1767,17 @@ 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 */