aboutsummaryrefslogtreecommitdiffstats
path: root/src/cue/cue_tag.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cue/cue_tag.c')
-rw-r--r--src/cue/cue_tag.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/cue/cue_tag.c b/src/cue/cue_tag.c
index 67919ce37..d5bfe26d3 100644
--- a/src/cue/cue_tag.c
+++ b/src/cue/cue_tag.c
@@ -178,9 +178,16 @@ cue_tag(struct Cd *cd, unsigned tnum)
if (tag == NULL)
return NULL;
+ tag->time = track_get_length(track)
+ - track_get_index(track, 1)
+ + track_get_zero_pre(track);
+ track = cd_get_track(cd, tnum+1);
+ if (track != NULL)
+ tag->time += track_get_index(track, 1)
+ - track_get_zero_pre(track);
/* libcue returns the track duration in frames, and there are
- 75 frames per second; this formula rounds up */
- tag->time = (track_get_length(track) + 74) / 75;
+ 75 frames per second; this formula rounds down */
+ tag->time = tag->time / 75;
return tag;
}