mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
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)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user