Commit 4a839537 authored by Josh Coalson's avatar Josh Coalson
Browse files

use flac file name instead of dummy.wav for --export-cuesheet-to (sf request...

use flac file name instead of dummy.wav for --export-cuesheet-to (sf request #1272825 https://sourceforge.net/tracker/index.php?func=detail&aid=1272825&group_id=13478&atid=363478)
parent b5134f1f
......@@ -170,6 +170,8 @@ FLAC__bool import_cs_from(const char *filename, FLAC__StreamMetadata **cuesheet,
FLAC__bool export_cs_to(const char *filename, const FLAC__StreamMetadata *cuesheet, const char *cs_filename)
{
FILE *f;
char *ref = 0;
size_t reflen;
if(0 == cs_filename || strlen(cs_filename) == 0) {
fprintf(stderr, "%s: ERROR: empty export file name\n", filename);
......@@ -185,7 +187,17 @@ FLAC__bool export_cs_to(const char *filename, const FLAC__StreamMetadata *cueshe
return false;
}
grabbag__cuesheet_emit(f, cuesheet, "\"dummy.wav\" WAVE");
reflen = strlen(filename) + 7 + 1;
if(0 == (ref = malloc(reflen))) {
fprintf(stderr, "%s: ERROR: allocating memory\n", filename);
return false;
}
snprintf(ref, reflen, "\"%s\" FLAC", filename);
grabbag__cuesheet_emit(f, cuesheet, ref);
free(ref);
if(f != stdout)
fclose(f);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment