diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2010-06-05 16:54:20 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2010-06-05 16:54:20 +0000 |
commit | b9fa4f0876d145cdbd679a053e93a152b83cd145 (patch) | |
tree | ab43bbfe5efe5bd82d178b1665250c8f10771267 /usr.bin | |
parent | 1ede4675f07dfde1078627b91e4b3c0a6b2e2957 (diff) |
Take into account wav ``riff'' header when calculating the offset
of the data chuck returned in ``startpos''. Fixes MMC relocate being
off by few samples.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/aucat/headers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/aucat/headers.c b/usr.bin/aucat/headers.c index a1a361a68ee..37594e2afc2 100644 --- a/usr.bin/aucat/headers.c +++ b/usr.bin/aucat/headers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: headers.c,v 1.17 2010/06/05 16:52:28 ratchov Exp $ */ +/* $OpenBSD: headers.c,v 1.18 2010/06/05 16:54:19 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -201,7 +201,7 @@ wav_readhdr(int fd, struct aparams *par, off_t *startpos, off_t *datasz, short * return 0; fmt_done = 1; } else if (memcmp(chunk.id, wav_id_data, 4) == 0) { - *startpos = pos; + *startpos = pos + sizeof(riff) + sizeof(chunk); *datasz = csize; break; } else { |