Skip to content
Snippets Groups Projects
  1. May 13, 2013
  2. May 08, 2013
    • Timothy B. Terriberry's avatar
      Fix 255 packet assertion. · efc0d57a
      Timothy B. Terriberry authored
      If we actually have 255 packets on a page, this assertion always
       triggers, because ogg_stream_packetout doesn't fail until we ask
       for the _next_ packet.
      efc0d57a
  3. May 07, 2013
    • Timothy B. Terriberry's avatar
      Fix seeking near the start of saved live streams. · 2862e2ea
      Timothy B. Terriberry authored
      If a stream starts with a non-zero granpos, we would subtract 80 ms
       from the target time, and then report failure when the best page
       we could find (the first page in the link) had a granpos larger
       than that.
      This worked for normal streams because the subtraction would fail
       (granpos can't wrap past -1) and we checked for that.
      2862e2ea
  4. May 01, 2013
  5. Apr 30, 2013
  6. Apr 28, 2013
  7. Apr 06, 2013
    • Timothy B. Terriberry's avatar
      Small public header clean-up. · c9964275
      Timothy B. Terriberry authored
      stdarg.h should've been inside the include guard.
      c9964275
    • Timothy B. Terriberry's avatar
      Small cleanups of the soft clipping code. · 7b499048
      Timothy B. Terriberry authored
      - Made OP_SOFT_CLIP defined only when using floating point (libopus
         handles clipping when using the fixed-point API).
      - Struct rearrangement for theoretically better packing on some
         platforms.
      - Reset the state tracking channel count when re-initializing a
         decoder (and not the dither mute, because that gets reset for
         free).
      7b499048
  8. Mar 25, 2013
    • Timothy B. Terriberry's avatar
      Use clipping prevention on 16-bit decode paths. · bf06c4f2
      Timothy B. Terriberry authored
      When we decode using libopus's fixed-point APIs, libopus internally
       applies soft clipping prevention.
      When we decode using libopus's floating-point APIs, this behavior
       is disabled.
      If we're ultimately planning to output the data to the user in
       fixed-point, we need to apply the clipping prevention ourselves.
      bf06c4f2
    • Timothy B. Terriberry's avatar
      Reset dither state when API path changes. · f8222c99
      Timothy B. Terriberry authored
      The caller can switch between the fixed/float APIs and the
       stereo/multichannel APIs on every call.
      Detect this and reset the dither state to avoid potentially
       injecting noise from a very out-of-date state when switching from
       fixed to float back to fixed, or from the wrong channels when
       switching between stereo and multichannel.
      Normal applications won't do this stuff, but we should be
       well-behaved if they do.
      f8222c99
    • Timothy B. Terriberry's avatar
      Minor comment fix. · 94b0c98a
      Timothy B. Terriberry authored
      94b0c98a
    • Timothy B. Terriberry's avatar
      Fix a buffer overflow in op_read_stereo(). · 81002442
      Timothy B. Terriberry authored
      For multichannel files, this potentially caused writes beyond the
       end of the output buffer provided by the user.
      81002442
  9. Mar 01, 2013
  10. Feb 28, 2013
    • Timothy B. Terriberry's avatar
      More minor win32 cleanups. · 27c8948a
      Timothy B. Terriberry authored
      Just normalizing coding style.
      27c8948a
    • Ralph Giles's avatar
      Add nu774 to the authors list. · 50ee9e30
      Ralph Giles authored and Ralph Giles's avatar Ralph Giles committed
      50ee9e30
    • Timothy B. Terriberry's avatar
      Support the Windows system certificate store. · 9a866b18
      Timothy B. Terriberry authored and Ralph Giles's avatar Ralph Giles committed
      OpenSSL on Windows does not pull certificates from any well-known
       location (in fact most binaries continue to use the default Unix
       path, which usually doesn't even exist).
      We could ship our own set of certificates (e.g., cloned from the
       Mozilla root list), but I don't want to be responsible for
       releasing libopusfile updates when things like DigiNotar
       fiasco [1] happen.
      That approach also means that we would need to load, parse, and
       keep a copy of every certificate in the system for every SSL
       session.
      
      OpenSSL has had patches sitting in their bugtracker which load
       certificates from the Crypto API's system certificate store.
      However, those patches have been sitting around for several years,
       so movement on that front in the near future seems unlikely.
      We don't care about using OpenSSL's builtin CAPI engine, though, so
       we can do the same thing with less than 200 lines of code.
      This puts the maintenance burden on Windows Update, which will be
       far more timely and effective than getting people to upgrade
       libopusfile, and gets us on-demand loading of just the
       certificates we need.
      
      [1] <https://bugzilla.mozilla.org/show_bug.cgi?id=682927>
      9a866b18
    • Timothy B. Terriberry's avatar
      Fix typo in 714d83c8. · e4217fbe
      Timothy B. Terriberry authored and Ralph Giles's avatar Ralph Giles committed
      e4217fbe
    • Timothy B. Terriberry's avatar
      Fix warnings when compiling with a recent MSVC. · 4ce926cb
      Timothy B. Terriberry authored and Ralph Giles's avatar Ralph Giles committed
      Apparently Vista includes more things in its Winsock implementation
       and errno.h than earlier versions of Windows.
      4ce926cb
    • Timothy B. Terriberry's avatar
      Clean up winsock usage. · 25477092
      Timothy B. Terriberry authored and Ralph Giles's avatar Ralph Giles committed
      This keeps differences which can be cleanly abstracted away clean
       (closesocket, ioctlsocket, getsockopt, setsockopt), and makes
       differences which cannot be cleanly abstracted explicit (SOCKET,
       INVALID_SOCKET, WSAGetLastError/WSASetLastError).
      It also gets rid of wsockwrapper.[ch], since it contained just a
       single function.
      
      This can successfully pass the seeking_example tests on
       big.chained.blob over https when built with i686-w64-mingw32 and
       run under wine.
      It does not solve the certificate distribution problems with using
       OpenSSL on a real Windows system.
      25477092
    • Timothy B. Terriberry's avatar
      Use fseeko64/ftello64 for mingw32. · d7591578
      Timothy B. Terriberry authored and Ralph Giles's avatar Ralph Giles committed
      It turns out i686-pc-mingw32 does define these functions, and they
       are always available (unlike _fseeki64/_ftelli64).
      This means we can build and link without requiring
       i686-w64-mingw32.
      The resulting binary still doesn't run in wine for me, but that may
       be a personal problem.
      d7591578
    • Timothy B. Terriberry's avatar
      Require WindowsXP for mingw32. · cc5f107c
      Timothy B. Terriberry authored and Ralph Giles's avatar Ralph Giles committed
      This allows an i686-pc-mingw32 build to use getaddrinfo/
       freeaddrinfo correctly.
      It's not needed for an i686-w64-mingw32 build, but it doesn't hurt
       to leave it in here.
      i686-pc-mingw32 still won't work correctly, because it does not
       support fseeko/ftello, nor (unless using MSVCRT 8.0 or later)
       _fseeki64/_ftelli64.
      We could define __MSVCRT_VERSION__ to 0x800 to get the latter, but
       this would require different MSVCRT versions than libogg and
       libopus are built with by default, which makes a bit of a mess.
      cc5f107c
    • Timothy B. Terriberry's avatar
      Clean up mingw32 configuruation. · 1e9d7d85
      Timothy B. Terriberry authored and Ralph Giles's avatar Ralph Giles committed
      Properly check for HTTP support and handle the case where it's
       disabled.
      Also fixes the include paths broken by 3e7f0ddc.
      1e9d7d85
    • Timothy B. Terriberry's avatar
      s/OS_WIN32/OP_WIN32/ · 100027a3
      Timothy B. Terriberry authored and Ralph Giles's avatar Ralph Giles committed
      The former is too generic.
      100027a3
    • Ralph Giles's avatar
      Merge two OS_WIN32 conditionals. · 383dfbb4
      Ralph Giles authored and Ralph Giles's avatar Ralph Giles committed
      383dfbb4
    • Ralph Giles's avatar
      Move win32 source files up a level. · 4a5c89ad
      Ralph Giles authored and Ralph Giles's avatar Ralph Giles committed
      4a5c89ad
    • Ralph Giles's avatar
      Initial winsock support patch from nu774. · 9c097eee
      Ralph Giles authored and Ralph Giles's avatar Ralph Giles committed
      Some tweak might be still needed to take care of OPENSSL_AppLink
      to get https support working. In win32, user application of openssl
      is required to include openssl/applink.c or something, when openssl
      is compiled with OPENSSL_USE_APPLINK.
      
      I don't know how it should be taken care of, from the library point of
      view (it must be done by user of libopusfile, since openssl always
      searches that function in executable module).
      
      Posted to the hydrogenaudio format 2012 November 19.
      http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=97856&view=findpost&p=814582
      9c097eee
  11. Feb 12, 2013
  12. Feb 10, 2013
    • Timothy B. Terriberry's avatar
      Allow decoding forward instead of seeking. · 3cc27477
      Timothy B. Terriberry authored
      This lets us seek forward by small amounts (currently less than
       90 ms) by decoding forward instead of actually seeking.
      This is often a good idea, since we would have to decode at least
       80 ms of pre-roll anyway.
      This optimization also handles the case of seeking to what is
       already the current position cheaply.
      
      This became relatively easy after we dropped op_pcm_seek_page()
       from the public API.
      However, because others may look to libopusfile's seeking code as a
       model, we've added an OP_SMALL_FOOTPRINT #define to cordon off
       some of these complex sections of code that are deeply specific to
       libopusfile's design, ancillary to the main seeking algorithm,
       and relatively unimportant to overall seeking performance.
      3cc27477
  13. Jan 27, 2013
Loading