1. 31 May, 2021 2 commits
    • Ralph Giles's avatar
      Add release checksums for opusfile 0.1 and 0.2. · 56728646
      Ralph Giles authored
      Add checksums for the first two source releases for completeness.
      These are copied from and verified against downloads.xiph.org.
      56728646
    • Ralph Giles's avatar
      Add release checksums for opusfile 0.12. · c656ae14
      Ralph Giles authored
      We keep checksums of the release packages in the repo as a
      redundant and trustworthy reference. I found these in an
      old working repo; it looks like they weren't committed
      after the 0.12 release last year.
      
      Checked against the files on downloads.xiph.org.
      c656ae14
  2. 26 May, 2021 1 commit
  3. 16 Dec, 2020 2 commits
    • Timothy B. Terriberry's avatar
      Fix an incorrect assertion in op_pcm_seek_page(). · 729c88e7
      Timothy B. Terriberry authored
      When we were checking the current file offset to see if we should
       use it as the starting bisection point, we assumed that offset was
       larger than the start of the data range for that link (and
       consequently, inside the bisection range).
      If there is a random page earlier in the file that happens to use
       the same serial number as a link we identified later in the file
       at file open time, and we had stopped reading there before the
       seek, then this assumption might not be true.
      
      Ironically, it was not the case that contained the assertion that
       had trouble with such an offset.
      It would fail the check that we were cutting off more than half the
       range, since we were actually cutting off a negative amount, and
       fall back to the midpoint of the link as the first bisection
       point.
      However, the case below that (where the target comes after the
       current timestamp), we might have erroneously cut off the entire
       range (setting end to offset, which was less than begi...
      729c88e7
    • Timothy B. Terriberry's avatar
      Fix intermediate overflow in op_pcm_total(). · 82adfb61
      Timothy B. Terriberry authored
      Although link enumeration ensures the return value is in range, the
       order of operations allows the intermediate value pcm_total+diff
       to overflow the range of a 64-bit int.
      Add parentheses to ensure this does not happen.
      Thanks to Felcia Lim for the report.
      
      Fixes #2330
      82adfb61
  4. 13 Oct, 2020 1 commit
    • Timothy B. Terriberry's avatar
      Fix short-circuit test when seeking in short files · 4174c26e
      Timothy B. Terriberry authored
      When a file is very, very short (i.e., only one packet) and uses
       end-trimming, the apparent granule position preceding the first
       sample in the first packet can underflow.
      We were computing this value by subtracting the packet duration
       from the computed per-packet granule position and expecting this
       computation to always succeed.
      Because it could fail in the presence of end-trimming on the first
       packet (ironically, exactly the situation where the short-circuit
       is helpful), it would leave the value uninitialized, and then use
       it in a comparison, which is undefined behavior.
      The correct solution is to check for failure and force the previous
       page's granule position to 0 in this case.
      4174c26e
  5. 16 Sep, 2020 1 commit
    • Timothy B. Terriberry's avatar
      Fix a possible divide-by-zero. · f94a1764
      Timothy B. Terriberry authored
      We were attempting to ensure a minimum spacing between granule
       positions when guessing the start of a link location.
      However, we took a strictly-positive granule position, added a
       fixed increment with op_granpos_add(), and checked if
       op_granpos_add() failed.
      op_granpos_add() only fails if the sum would have overflowed past
       zero, which can never happen when adding two strictly positive
       granule positions.
      Instead, we need to check if the result becomes negative (which is
       a legal granule position, but violates our assumptions in the
       search).
      
      Thanks to Felicia Lim for the report.
      f94a1764
  6. 01 Aug, 2020 1 commit
  7. 26 Jun, 2020 8 commits
  8. 25 Jun, 2020 2 commits
  9. 24 Jun, 2020 9 commits
    • Ralph Giles's avatar
      mingw: Pull opusfile source from gitlab. · f267cc58
      Ralph Giles authored
      Update the build environment container to use the gitlab.xiph.org
      url instead of the no-longer-available git.xiph.org.
      f267cc58
    • Ralph Giles's avatar
      mingw: Use Makefile.unix to build opusfile. · 1a3c9323
      Ralph Giles authored
      This is faster. We still don't have good dependency tracking
      among the components, but roughly:
      
          make
          make opusfile-0.dll
          make package
      
      Should automate the basics of putting together a win32 binary
      package. It still doesn't include documentation. See the
      mingw/README for additional steps there.
      
      Also, don't copy dll.a files. They don't seem to be necessary.
      1a3c9323
    • Ralph Giles's avatar
      mingw: Build autotools opusfile in a subdirectory. · a0c91360
      Ralph Giles authored
      Invoking ../configure from the mingw directory would clobber
      the mingw-specific Makefile, which is confusing. Instead
      have the `make opusfile` target invoke the autotools build
      within a subdirectory.
      a0c91360
    • Ralph Giles's avatar
      mingw: Build against openssl 1.0.2u. · 7304e328
      Ralph Giles authored
      Download the most recent working release of openssl.
      - Enable asm, since it seems to work now.
      - Link ssl and crypto libraries statically, since the
        dll target seems to be broken.
      
      The 1.0.2 series of openssl releases is no longer supported.
      However, 1.1.1 and later broke the hooks we were using to
      reference the Windows certificate store, so this is also
      the newest release where opusurl works.
      
      As such, this shouldn't be used in production (unless you have a
      support contract for openssl!) but it's a useful reference
      configuration to have in the repository.
      
      Hopefully a replacement api will be available in openssl 3 or 4
      and we can port to that for future releases.
      7304e328
    • Ralph Giles's avatar
      mingw: Update openssl dll filename. · f24ad4cf
      Ralph Giles authored
      This seems to have changed to be more like the unix build.
      We'll probably need libcrypto-1_1.dll too, but I haven't
      gotten to the link step yet. This fails because of api
      changes between (no longer supported) 1.0.x versions
      and the current stable 1.1.
      f24ad4cf
    • Ralph Giles's avatar
      mingw: Remove obsolete comment. · 2adb7e06
      Ralph Giles authored
      This was a reference from an older build script and it no longer
      necessary. Having in the Makefile just confuses things.
      2adb7e06
    • Ralph Giles's avatar
      mingw: Build for 32-bit targets. · d2153217
      Ralph Giles authored
      We had a request for 64-bit Windows binaries at some point, but
      win32 is more broadly compatible. Since everything's broken,
      let's concentrate on that and add rules to generate a separate
      opusfile-${version}-win64 package later.
      d2153217
    • Ralph Giles's avatar
      mingw: Update dependency versions. · 39c355ac
      Ralph Giles authored
      Latest release versions and checksums.
      39c355ac
    • Ralph Giles's avatar
      mingw: Update docker base image to fedora 32. · 0e2055e4
      Ralph Giles authored
      This is the current release.
      
      The gcc runtime dll filename has changed, so the package script
      is also updated.
      0e2055e4
  10. 11 May, 2020 3 commits
    • Ralph Giles's avatar
      Move win32 package build details to mingw/README.md · eb252537
      Ralph Giles authored
      In theory `mingw/Makefile` can build a binary release, but
      it doensn't quite works and omits some niceties, so we still
      need the detailed build instructions to compare with.
      
      However, the details aren't relevent to the general release
      checklist, so pretend `make -C ming package` works at that
      level.
      
      Also convert the mingw README to markdown for better
      display on hosting sites.
      eb252537
    • Ralph Giles's avatar
      Update release checklist. · c8734f3a
      Ralph Giles authored
      Documentation should be copied to the website as part of the
      source release process, not building win32 binaries.
      c8734f3a
    • Ralph Giles's avatar
      Document Doxygen issue fix. · d731afe0
      Ralph Giles authored
      https://github.com/doxygen/doxygen/issues/6456 is fixed in
      Doxygen 1.8.15. Update teh release checklist to reflect this
      
      Thanks to derf for checking this.
      d731afe0
  11. 04 May, 2020 6 commits
  12. 02 May, 2020 4 commits
    • Mark Harris's avatar
      ae4968d1
    • Timothy B. Terriberry's avatar
      Silence scan-build false positives. · ccdef60e
      Timothy B. Terriberry authored
      The actual guarantees we are making in op_read_native() are:
      - if _pcm == NULL, then _buf_sz <= 0 (requirement on the caller),
      - op_get_packet_duration() will succeed and return a positive value
         no larger than 120*48 (guaranteed by op_collect_audio_packets()
         filtering out any packets with invalid TOC sequences), and
      - nchannels is a small number greater than 0 (guaranteed by the
         validation in opus_parse_head()).
      However, trying to assert these things is not enough to convince
       clang to take the nsamples*nchannels>_buf_sz or
       duration*nchannels>_buf_sz branches when _pcm==NULL, so instead
       we have to be a bit more direct.
      ccdef60e
    • Timothy B. Terriberry's avatar
      Relax some assumptions about our seeking success. · 77121e1b
      Timothy B. Terriberry authored
      There really isn't anything that guarantees we can find timestamps
       within the bounds of the link, or within 2 billion samples of the
       target, if people resort to nasty things like swapping out all of
       the underlying file data on us at the right moment.
      Reported by clang's static analysis in
       https://github.com/xiph/opusfile/issues/16
      
      Thanks to kcgen for filing the report.
      77121e1b
    • Timothy B. Terriberry's avatar
      Avoid a potential divide-by-zero. · a931e217
      Timothy B. Terriberry authored
      Reported by clang's static analysis in
       https://github.com/xiph/opusfile/issues/16
      This would have taken about 22 TB of junk data before the first
       decoded sample to trigger, so not very likely to occur in
       practice.
      
      Thanks to kcgen for filing the report.
      a931e217