* [9front] audio/flacenc: fix error check for fseeko
@ 2021-02-11 5:52 Michael Forney
2021-02-11 8:40 ` Sigrid Solveig Haflínudóttir
0 siblings, 1 reply; 2+ messages in thread
From: Michael Forney @ 2021-02-11 5:52 UTC (permalink / raw)
To: 9front
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).
diff 39dc377d3b0a9384a9761a5d28810e3a46b19739 da45a346b7551889d2599eb049ecaea63a2a55df
--- a/sys/src/cmd/audio/flacenc/flacenc.c Wed Feb 10 01:00:05 2021
+++ b/sys/src/cmd/audio/flacenc/flacenc.c Wed Feb 10 21:52:02 2021
@@ -18,7 +18,7 @@
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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-11 8:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-11 5:52 [9front] audio/flacenc: fix error check for fseeko Michael Forney
2021-02-11 8:40 ` Sigrid Solveig Haflínudóttir
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).