summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2021-02-11 09:37:36 +0100
committerMichael Forney <mforney@mforney.org>2021-02-11 09:37:36 +0100
commit5fd4fa912ef622333b38268786ff4609c81f2ec9 (patch)
tree17ecf51670b3ade217d374b8ebf4602f8b20e5a3
parentf2974b6cfaec397279c939e41160c0073ac1ab05 (diff)
downloadplan9front-5fd4fa912ef622333b38268786ff4609c81f2ec9.tar.xz
[9front] audio/flacenc: fix error check for fseeko
fseeko returns 0 on success, not the new stream position. This allows flacenc to update the streaminfo block when it is finished (for example to set the number of samples and checksum).
-rw-r--r--sys/src/cmd/audio/flacenc/flacenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/audio/flacenc/flacenc.c b/sys/src/cmd/audio/flacenc/flacenc.c
index c19c84621..773d11de3 100644
--- a/sys/src/cmd/audio/flacenc/flacenc.c
+++ b/sys/src/cmd/audio/flacenc/flacenc.c
@@ -18,7 +18,7 @@ encwrite(FLAC__StreamEncoder *enc, FLAC__byte buffer[], size_t bytes, unsigned s
static FLAC__StreamEncoderSeekStatus
encseek(FLAC__StreamEncoder *enc, FLAC__uint64 absolute_byte_offset, void *client_data)
{
- return fseeko(stdout, absolute_byte_offset, SEEK_SET) != absolute_byte_offset ?
+ return fseeko(stdout, absolute_byte_offset, SEEK_SET) != 0 ?
FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED :
FLAC__STREAM_ENCODER_SEEK_STATUS_OK;
}