* [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
* Re: [9front] audio/flacenc: fix error check for fseeko
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
0 siblings, 0 replies; 2+ messages in thread
From: Sigrid Solveig HaflÃnudóttir @ 2021-02-11 8:40 UTC (permalink / raw)
To: 9front
Pushed, thanks!
^ 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
9front - general discussion about 9front
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://inbox.vuxu.org/9front
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V1 9front 9front/ http://inbox.vuxu.org/9front \
9front@9front.org
public-inbox-index 9front
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://inbox.vuxu.org/vuxu.archive.9front
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git