diff options
author | Michael Coulter <mjc@cvs.openbsd.org> | 2007-05-29 21:13:10 +0000 |
---|---|---|
committer | Michael Coulter <mjc@cvs.openbsd.org> | 2007-05-29 21:13:10 +0000 |
commit | 7e13027be6ef7e0923c3b1625244cb8eec6bc534 (patch) | |
tree | b944d9f609fac30225032656fd74d801f5896836 /usr.bin/cdio/rip.c | |
parent | 7a9271513944d6b3dcefacee2bb22713fb4eb9cd (diff) |
reorder code so that the wave header gets the size of the current track
instead of the previous track. Alexey Vatchenko agrees.
Diffstat (limited to 'usr.bin/cdio/rip.c')
-rw-r--r-- | usr.bin/cdio/rip.c | 16 |
1 files 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); |