From 644feceb5ceac05ec6c0876d16eb3d627ff98f0c Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 20 May 2013 11:01:57 +0000 Subject: [PATCH] Allowed option input_sheet_v07t= to read multiple blocks from same file --- cdrskin/cdrskin.1 | 12 ++++++++++-- cdrskin/cdrskin.c | 17 +++++++++++------ cdrskin/cdrskin_timestamp.h | 2 +- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/cdrskin/cdrskin.1 b/cdrskin/cdrskin.1 index b9101a4..e5c5fa4 100644 --- a/cdrskin/cdrskin.1 +++ b/cdrskin/cdrskin.1 @@ -2,7 +2,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH CDRSKIN 1 "Version 1.3.1, May 19, 2013" +.TH CDRSKIN 1 "Version 1.3.1, May 20, 2013" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -1157,7 +1157,15 @@ growisofs -dvd-compat is roughly equivalent to cdrskin without option -multi. .BI input_sheet_v07t= path Read CD-TEXT definitions from a Sony Input Sheet version 0.7T. Up to eight or seven such sheets can be read by multiple input_sheet_v07t= options. -Each will define a CD-TEXT language block. +Each will define one CD-TEXT language block. +.br +The first line of a sheet file decides whether more than one sheet +may be defined by the file. If it is +.br + Input Sheet Version = 0.7T +.br +then each further line with that text switches to the next sheet for the next block. +If it is not, then all definitions apply to a single block. .br The information in such a sheet is given by text lines of the following form: .br diff --git a/cdrskin/cdrskin.c b/cdrskin/cdrskin.c index 516b933..5eaf9ca 100644 --- a/cdrskin/cdrskin.c +++ b/cdrskin/cdrskin.c @@ -6950,7 +6950,7 @@ int Cdrskin_read_input_sheet_v07t(struct CdrskiN *skin, char *path, int block, { int ret= 0; - ret= burn_session_input_sheet_v07t(session, path, block, 0); + ret= burn_session_input_sheet_v07t(session, path, block, 1); return(ret); } @@ -7034,7 +7034,7 @@ int Cdrskin_burn(struct CdrskiN *skin, int flag) int source_fd, is_from_stdin; int text_flag= 4; /* Check CRCs and silently repair CRCs if all are 0 */ unsigned char *text_packs= NULL; - int num_packs= 0, start_block; + int num_packs= 0, start_block, block_no; #ifndef Cdrskin_no_cdrfifO double put_counter, get_counter, empty_counter, full_counter; @@ -7155,12 +7155,17 @@ burn_failed:; if(i < 0x8f) start_block= 1; } - for(i= 0; i < skin->sheet_v07t_blocks && i < 8 - start_block; i++) { - ret= Cdrskin_read_input_sheet_v07t(skin, - skin->sheet_v07t_paths[i], - i + start_block, session, 0); + block_no = start_block; + for(i= 0; i < skin->sheet_v07t_blocks && block_no < 8; i++) { + ret= Cdrskin_read_input_sheet_v07t(skin, skin->sheet_v07t_paths[i], + block_no, session, 0); if(ret <= 0) goto burn_failed; + block_no += ret; + } + if(i < skin->sheet_v07t_blocks) { + fprintf(stderr, "cdrskin: WARNING : Too many CD-TEXT blocks. input_sheet_v07t= files ignored: %d\n", + skin->sheet_v07t_blocks - i); } } } diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 0dfa0c9..5dd1235 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2013.05.20.104814" +#define Cdrskin_timestamP "2013.05.20.110128"