From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 13971 invoked from network); 11 Feb 2021 05:59:40 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 11 Feb 2021 05:59:40 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Received: from mail-pg1-f170.google.com ([209.85.215.170]) by 1ess; Thu Feb 11 00:56:32 -0500 2021 Received: by mail-pg1-f170.google.com with SMTP id o63so3147492pgo.6 for <9front@9front.org>; Wed, 10 Feb 2021 21:56:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mforney-org.20150623.gappssmtp.com; s=20150623; h=message-id:to:from:date:subject; bh=s4fLYrmbIjrBVJ/pofAUcHID58KPbpZhZuxhfjAlTg0=; b=kGrGJPjwCk+8CHwKwdib9bZjlGGtikAQcqyKr1ZDnhHXM/Jkgigeki89DF4MWRZUEY 7xZhOm/w5c81IJPINC7rdpNljJVDOd+Q47iMfLhkCKAiBm+h2XwjE9zMKvdHZGGhxQI3 VOoozLifW4v1PCa/f6suug6ZTkz8ZBb8MO8f8xYx79Xd9mHn6F7A0PL9Bjnwc50SHQzC sFn0ZyABRfykma1AMt/L0DM2LvuakAsvLbpmi1y4ZySv+gFsGXfPgvdDpYaH38fKCRSN jW8gngh21p04Lere7wupAZvuMOG+1QenKqA6oZdhHzw/JRUxXK3/zKizHWbvaH26LnYe lj4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:to:from:date:subject; bh=s4fLYrmbIjrBVJ/pofAUcHID58KPbpZhZuxhfjAlTg0=; b=GHTQ5p2EpuMah9Uuqf5yOujCHe78tbBDXe0tw9pxbhJWM9ZcG7qDvdmITn21TRYCYS qniFeIiL4A1RLE5eR41/r6AM3RLWOKDzkRXkl3NeUxhlnZ57V2c3PNTg4SGpb7GYumUF ccNL7faOtuLSARgEvAxI0G9Ys6Fd1TZZYEj7dGgvYuaOet38ZoKYfofsCUSx4qDQQjtf mRp4yd2hyQ1j1qQETYMLoo7PuUoZaObHlqgzgNckazmfyA6gnEgNXYg4YOJ/yOFxMaLf BhcZJKnawmMN71eUVXQejluuYL9W6X+pFja0ifbsKNvY4UcuLiFivq7rGP5iJY2DaBof NcuA== X-Gm-Message-State: AOAM533EVxNHaVFaJikgEhnEBzBNPpek4T/NB4T3nkn4Vhz/K+083FWy rfjZYUPASOk81FgT/FgLc4iN4HQ1jK8RetjH0Bw= X-Google-Smtp-Source: ABdhPJzhxDQ+JfL2w1Ntwx9PMsJPHASjCo/rjZSR2m39m+DGcFf+dfBMwP+vhUp3yDKDKTeAtl8uzw== X-Received: by 2002:aa7:9e90:0:b029:1dd:3cd6:9dde with SMTP id p16-20020aa79e900000b02901dd3cd69ddemr6546711pfq.57.1613022978154; Wed, 10 Feb 2021 21:56:18 -0800 (PST) Return-Path: Received: from arrow.hsd1.ca.comcast.net (c-73-70-188-119.hsd1.ca.comcast.net. [73.70.188.119]) by smtp.gmail.com with ESMTPSA id e17sm3713607pjh.39.2021.02.10.21.56.17 for <9front@9front.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Feb 2021 21:56:17 -0800 (PST) Message-ID: <257E497C2C9B010EDAE1896C1E653CC6@arrow.hsd1.ca.comcast.net> To: 9front@9front.org From: Michael Forney Date: Thu, 11 Feb 2021 05:52:02 +0000 List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: descriptor extension-based firewall NoSQL cloud Subject: [9front] audio/flacenc: fix error check for fseeko Reply-To: 9front@9front.org Precedence: bulk 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; }