Skip to content

Commit

Permalink
Return -1 for unknown length
Browse files Browse the repository at this point in the history
  • Loading branch information
lipnitsk committed Oct 26, 2015
1 parent 8855ccd commit 8065fda
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,18 @@ Track *track_init(void)
} else {
track->zero_pre.type = DATA_ZERO;
track->zero_pre.name = NULL;
track->zero_pre.start = 0;
track->zero_pre.length = 0;
track->zero_pre.start = -1;
track->zero_pre.length = -1;

track->file.type = DATA_AUDIO;
track->file.name = NULL;
track->file.start = 0;
track->file.length = 0;
track->file.start = -1;
track->file.length = -1;

track->zero_post.type = DATA_ZERO;
track->zero_post.name = NULL;
track->zero_post.start = 0;
track->zero_post.length = 0;
track->zero_post.start = -1;
track->zero_post.length = -1;

track->mode = MODE_AUDIO;
track->sub_mode = SUB_MODE_RW;
Expand Down
2 changes: 1 addition & 1 deletion cue_parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ track_statement

/* Set previous track length if it has not been set */
if (NULL != prev_track && NULL == cur_filename
&& track_get_length (prev_track) == 0) {
&& track_get_length (prev_track) == -1) {
/* track shares file with previous track */
prev_length = $3 - track_get_start(prev_track);
track_set_length(prev_track, prev_length);
Expand Down

0 comments on commit 8065fda

Please sign in to comment.