Don't error out on handling "NO PRE_EMPHASIS" in cdrdao TOC.
Savannah bug #34826:
This commit is contained in:
@@ -654,6 +654,7 @@ AC_CONFIG_FILES([
|
|||||||
src/cd-paranoia/doc/ja/cd-paranoia.1 \
|
src/cd-paranoia/doc/ja/cd-paranoia.1 \
|
||||||
src/cd-paranoia/doc/ja/Makefile \
|
src/cd-paranoia/doc/ja/Makefile \
|
||||||
src/Makefile \
|
src/Makefile \
|
||||||
|
test/check_common_fn \
|
||||||
test/data/Makefile \
|
test/data/Makefile \
|
||||||
test/driver/Makefile \
|
test/driver/Makefile \
|
||||||
test/driver/bincue.c \
|
test/driver/bincue.c \
|
||||||
@@ -662,7 +663,6 @@ AC_CONFIG_FILES([
|
|||||||
test/testgetdevices.c \
|
test/testgetdevices.c \
|
||||||
test/testisocd2.c \
|
test/testisocd2.c \
|
||||||
test/testpregap.c \
|
test/testpregap.c \
|
||||||
test/check_common_fn \
|
|
||||||
test/Makefile \
|
test/Makefile \
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* -*- c -*-
|
/* -*- c -*-
|
||||||
|
|
||||||
Copyright (C) 2005, 2006, 2008, 2009, 2010 Rocky Bernstein
|
Copyright (C) 2005, 2006, 2008, 2009, 2010, 2011 Rocky Bernstein
|
||||||
<rocky@gnu.org>
|
<rocky@gnu.org>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
$Id: cdrdao.c,v 1.27 2008/04/21 18:30:22 karl Exp $
|
|
||||||
|
|
||||||
Copyright (C) 2004, 2005, 2006, 2007, 2008 Rocky Bernstein <rocky@gnu.org>
|
Copyright (C) 2004, 2005, 2006, 2007, 2008 Rocky Bernstein <rocky@gnu.org>
|
||||||
toc reading routine adapted from cuetools
|
toc reading routine adapted from cuetools
|
||||||
Copyright (C) 2003 Svend Sanjay Sorensen <ssorensen@fastmail.fm>
|
Copyright (C) 2003 Svend Sanjay Sorensen <ssorensen@fastmail.fm>
|
||||||
@@ -612,7 +610,6 @@ parse_tocfile (_img_private_t *cd, const char *psz_cue_name)
|
|||||||
} else if (0 == strcmp ("PRE_EMPHASIS", psz_field))
|
} else if (0 == strcmp ("PRE_EMPHASIS", psz_field))
|
||||||
if (NULL != cd) {
|
if (NULL != cd) {
|
||||||
cd->tocent[i].flags &= ~CDIO_TRACK_FLAG_PRE_EMPHASIS;
|
cd->tocent[i].flags &= ~CDIO_TRACK_FLAG_PRE_EMPHASIS;
|
||||||
goto err_exit;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
goto format_error;
|
goto format_error;
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ check_DATA = \
|
|||||||
t7.toc \
|
t7.toc \
|
||||||
t8.toc \
|
t8.toc \
|
||||||
t9.toc \
|
t9.toc \
|
||||||
|
t10.toc \
|
||||||
vcd2.toc \
|
vcd2.toc \
|
||||||
videocd.nrg \
|
videocd.nrg \
|
||||||
cdtext.toc \
|
cdtext.toc \
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
CD_ROM_XA
|
CD_ROM_XA
|
||||||
|
|
||||||
TRACK MODE2_FORM2
|
TRACK MODE2_FORM2
|
||||||
FILE "isofs-m1.bin" 00:00:00 00:13:57
|
FILE "isofs-m1.bin" 00:00:00 00:01:57
|
||||||
|
|
||||||
TRACK MODE2_FORM1
|
TRACK MODE2_FORM1
|
||||||
PREGAP 0:2:0
|
PREGAP 0:2:0
|
||||||
FILE "isofs-m1.bin" 00:20:71 00:00:00
|
FILE "isofs-m1.bin" 00:20:71 00:00:10
|
||||||
|
|
||||||
|
|||||||
@@ -5,4 +5,4 @@
|
|||||||
CD_ROM
|
CD_ROM
|
||||||
|
|
||||||
TRACK MODE2
|
TRACK MODE2
|
||||||
FILE "isofs-m1.bin" 00:00:00 00:13:57
|
FILE "isofs-m1.bin" 00:00:00 00:01:57
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
CD_ROM_XA
|
CD_ROM_XA
|
||||||
|
|
||||||
TRACK MODE1 // ISO filesystem
|
TRACK MODE1 // ISO filesystem
|
||||||
FILE "isofs-m1.bin" 00:00:00 00:13:57
|
FILE "isofs-m1.bin" 00:00:00 00:03:57
|
||||||
|
|
||||||
TRACK MODE2_FORM_MIX // XA track with form 1 and form 2 sectors
|
TRACK MODE2_FORM_MIX // XA track with form 1 and form 2 sectors
|
||||||
PREGAP 0:2:0
|
PREGAP 0:2:0
|
||||||
|
|||||||
8
test/data/t10.toc
Normal file
8
test/data/t10.toc
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
// non default CTL flag of track 1
|
||||||
|
|
||||||
|
TRACK AUDIO
|
||||||
|
COPY
|
||||||
|
NO PRE_EMPHASIS
|
||||||
|
FOUR_CHANNEL_AUDIO
|
||||||
|
FILE "cdda.bin" 1:0:0
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
#define DATA_DIR "@abs_top_srcdir@/test/data"
|
#define DATA_DIR "@abs_top_srcdir@/test/data"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define NUM_GOOD_TOCS 16
|
#define NUM_GOOD_TOCS 17
|
||||||
#define NUM_BAD_TOCS 8
|
#define NUM_BAD_TOCS 8
|
||||||
int
|
int
|
||||||
main(int argc, const char *argv[])
|
main(int argc, const char *argv[])
|
||||||
@@ -60,6 +60,7 @@ main(int argc, const char *argv[])
|
|||||||
"t7.toc",
|
"t7.toc",
|
||||||
"t8.toc",
|
"t8.toc",
|
||||||
"t9.toc",
|
"t9.toc",
|
||||||
|
"t10.toc",
|
||||||
"data1.toc",
|
"data1.toc",
|
||||||
"data2.toc",
|
"data2.toc",
|
||||||
"data5.toc",
|
"data5.toc",
|
||||||
@@ -92,13 +93,16 @@ main(int argc, const char *argv[])
|
|||||||
|
|
||||||
cdio_loglevel_default = verbose ? CDIO_LOG_DEBUG : CDIO_LOG_WARN;
|
cdio_loglevel_default = verbose ? CDIO_LOG_DEBUG : CDIO_LOG_WARN;
|
||||||
for (i=0; i<NUM_GOOD_TOCS; i++) {
|
for (i=0; i<NUM_GOOD_TOCS; i++) {
|
||||||
|
CdIo_t *p_cdio;
|
||||||
snprintf(psz_tocfile, sizeof(psz_tocfile)-1,
|
snprintf(psz_tocfile, sizeof(psz_tocfile)-1,
|
||||||
"%s/%s", DATA_DIR, toc_file[i]);
|
"%s/%s", DATA_DIR, toc_file[i]);
|
||||||
if (!cdio_is_tocfile(psz_tocfile)) {
|
if (!cdio_is_tocfile(psz_tocfile) ||
|
||||||
|
!(p_cdio = cdio_open_cdrdao(psz_tocfile))) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Incorrect: %s doesn't parse as a cdrdao TOC file.\n", toc_file[i]);
|
"Incorrect: %s doesn't parse as a cdrdao TOC file.\n", toc_file[i]);
|
||||||
ret=i+1;
|
ret=i+1;
|
||||||
} else {
|
} else {
|
||||||
|
cdio_destroy(p_cdio);
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printf("Correct: %s parses as a cdrdao TOC file.\n",
|
printf("Correct: %s parses as a cdrdao TOC file.\n",
|
||||||
toc_file[i]);
|
toc_file[i]);
|
||||||
|
|||||||
Reference in New Issue
Block a user