summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormjc <mjc@openbsd.org>2007-05-29 21:13:09 +0000
committermjc <mjc@openbsd.org>2007-05-29 21:13:09 +0000
commitabd70c8f800a747acea5b6899543af350049dedb (patch)
tree30901e57568ad740ef4362c156fdd2811452a186
parentremove the ztsscale sysctl; ok deraadt@ (diff)
downloadwireguard-openbsd-abd70c8f800a747acea5b6899543af350049dedb.tar.xz
wireguard-openbsd-abd70c8f800a747acea5b6899543af350049dedb.zip
reorder code so that the wave header gets the size of the current track
instead of the previous track. Alexey Vatchenko agrees.
-rw-r--r--usr.bin/cdio/rip.c16
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);