From 7e13027be6ef7e0923c3b1625244cb8eec6bc534 Mon Sep 17 00:00:00 2001 From: Michael Coulter Date: Tue, 29 May 2007 21:13:10 +0000 Subject: reorder code so that the wave header gets the size of the current track instead of the previous track. Alexey Vatchenko agrees. --- usr.bin/cdio/rip.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/usr.bin/cdio/rip.c b/usr.bin/cdio/rip.c index 7a2029c2551..db26a990e04 100644 --- a/usr.bin/cdio/rip.c +++ b/usr.bin/cdio/rip.c @@ -489,14 +489,6 @@ rip_tracks_loop(struct track_pair *tp, u_int n_tracks, toc_buffer[i].track, (info.isaudio) ? "wav" : "dat"); - error = next_track(&info); - if (error == NXTRACK_SKIP) - continue; - else if (error == NXTRACK_FAIL) { - error = -1; - break; - } - if (msf) { info.start_lba = msf2lba( toc_buffer[i].addr.msf.minute, @@ -511,6 +503,14 @@ rip_tracks_loop(struct track_pair *tp, u_int n_tracks, info.end_lba = toc_buffer[i + 1].addr.lba; } + error = next_track(&info); + if (error == NXTRACK_SKIP) + continue; + else if (error == NXTRACK_FAIL) { + error = -1; + break; + } + error = read_track(fd, &info); close(info.fd); -- cgit v1.2.3