Skip to content

Commit

Permalink
Add support for noncompliant CUEs
Browse files Browse the repository at this point in the history
  • Loading branch information
lipnitsk committed Oct 26, 2015
1 parent 8065fda commit 60d6342
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cue_parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,12 @@ track_data
if (NULL != new_filename) {
yyerror("too many files specified\n");
}
new_filename = strncpy(fnamebuf, $2, sizeof(fnamebuf));
new_filename[strlen(new_filename)] = '\0';
if (track && track_get_index(track, 1) == -1) {
track_set_filename (track, $2);
} else {
new_filename = strncpy(fnamebuf, $2, sizeof(fnamebuf));
new_filename[strlen(new_filename)] = '\0';
}
}
;

Expand Down Expand Up @@ -247,7 +251,7 @@ track_statement

long idx00 = track_get_index (track, 0);

if (idx00 != -1)
if (idx00 != -1 && $3 != 0)
track_set_zero_pre (track, $3 - idx00);
}

Expand Down

0 comments on commit 60d6342

Please sign in to comment.