- Jul 06, 2016
-
-
Timothy B. Terriberry authored
The API and ABI is not backwards-compatible. This is based on the prerelease version 1.1.0-pre5. It should continue to work with older versions of OpenSSL. Thanks to Ron Lee and the Debian project for reporting the build errors and testing the patch.
-
- Jul 04, 2016
-
-
Timothy B. Terriberry authored
-
Timothy B. Terriberry authored
If the parsing fails before all comments are filled in, we will attempt to free any binary metadata at the position one past the last comment, which will be uninitialized. Introduced in commit 0221ca95.
-
Timothy B. Terriberry authored
According to the API, you can pass in a NULL OpusTags object to simply check if the comment packet is valid, without storing the parsed results. However, the additions to store binary metadata in commit 0221ca95 did not check for this. Fixes Coverity CID 149873.
-
Timothy B. Terriberry authored
In 0221ca95 the allocation result went from being stored directly in "_tags->user_comments[ncomments]" to being stored in the temporary "comment". However, the NULL check for allocation failure was not updated to match. This meant this function would almost always fail, unless you had added binary metadata first. Fixes Coverity CID 149874.
-
Timothy B. Terriberry authored
This bug appears to have been present since the original code import. This was a "clever" rearrangement of the control flow from the _fetch_and_process_packet() in vorbisfile to use a do ... while(0) instead of a "while(1)". However, this also makes "continue" equivalent to "break": it does not actually go back to the top of the loop, because the loop condition is false. This bug was harmless, because ogg_stream_pagein() then refuses to ingest a page with the wrong serialno, but we can simplify things by fixing it. The "not strictly necessary" loop is now completely unnecessary. The extra checks that existed in vorbisfile have all been moved to later in the main loop, so we can just continue that one directly, with no wasted work, instead of embedding a smaller loop inside. Fixes Coverity CID 149875.
-
Timothy B. Terriberry authored
In the non-seekable case, we'll undercount some bytes at the start of a new link. Still thinking about the best way to address this, but leaving a comment so I don't forget.
-
Timothy B. Terriberry authored
Going with "no" for now, but leave a reminder in the source code that this is a debatable question.
-
- Jun 26, 2016
-
-
Timothy B. Terriberry authored
-
- Jun 19, 2016
-
-
Timothy B. Terriberry authored
-
- Jun 16, 2016
-
-
Timothy B. Terriberry authored
This was set to 1 by all callers, so we can simplify logic by just removing it. This appears to have already been true in the libvorbisfile code from which this was adapted.
-
- Dec 30, 2015
-
-
Timothy B. Terriberry authored
In op_[v]open_url() and op_[v]test_url(), if we successfully connected to the URL but fail to parse it as an Opus stream, then we would return to the calling application without clearing any OpusServerInfo we might have filled in when connecting. This contradicts the general contract for user output buffers in our APIs, which is that they do not need to be initialized prior to a call and that their contents are untouched if a function fails (so that an application need do no additional clean-up on error). It would have been possible for an application to avoid these leaks by always calling opus_server_info_init() before a call to op_[v]open_url() or op_[v]test_url() and always calling opus_server_info_clear() afterwards (even on failure), but our examples don't do this and no other API of ours requires it. Fix the potential leaks by wrapping the implementation of op_url_stream_vcreate() so we can a) tell if the information was requested and b) store it in a separate, local buffer and delay copying it to the application until we know we've succeeded.
-
Timothy B. Terriberry authored
This adds support for accessing any binary metadata at the end of the comment header, as first specified in <https://tools.ietf.org/html/draft-ietf-codec-oggopus-05>. It also allows the data to be set and preserves the data when doing deep copies.
-
- Dec 29, 2015
-
-
Timothy B. Terriberry authored
This includes convenience routines specifying the album gain should be applied and for parsing the tag.
-
- Dec 15, 2015
-
-
Timothy B. Terriberry authored
In commit 41c29626 I claimed that it was not worth the machinery to buffer an extra page to avoid a seek when we have continued packet data. That was a little unsatisfying, considering how much effort we make to avoid unnecessary seeking elsewhere, but in the general case, we might have to buffer an arbitrary number of pages, since a packet can span several. However, we already have the mechanism to do this buffering: the ogg_stream_state. There are a number of potentially nasty corner-cases, but libogg's page sequence number tracking prevents us from accidentally gluing extraneous packet data onto some other unsuspecting packet, so I believe the chance of introducing new bugs here is manageable. This reduces the number of seeks in Simon Jackson's continued-page test case by over 23%. This also means we can handle pages without useful timestamps (including those multiplexed from another stream) between the last timestamped page at or before our target and the first timestamped page after our target without any additional seeks. Previously we would scan all of this data, see that the 'page_offset' of the most recent page we read was way beyond 'best' (the end of the last timestamped page before our target), and then seek back and scan it all again. This should greatly reduce the number of seeks we need in multiplexed streams, even if there are no continued packets.
-
Timothy B. Terriberry authored
We avoid seeking when the seek target lies within the packets buffered from the current page. However, the calculation of the page start time was _adding_ the first packet's duration to its end time, instead of subtracting it.
-
- Dec 07, 2015
-
-
Timothy B. Terriberry authored
When assertions are disabled, nothing else uses header_len.
-
- Dec 06, 2015
-
-
Timothy B. Terriberry authored
If the packet where we wanted to start decoding was continued from a previous page, and _other_ packets ended on that previous page, we wouldn't feed the previous page to the ogg_stream_state. That meant we wouldn't get the packet we wanted, and would fail with OP_EBADLINK (because the starting PCM offset of the first packet we did decode would already be after the one we wanted). Instead, check for continued packet data and feed in an extra page to prime the stream state. Thanks to Simon Jackson for the report and the excellent test case.
-
Timothy B. Terriberry authored
-
- Feb 27, 2015
-
-
Timothy B. Terriberry authored
OS X 10.5.8 does not define AI_NUMIERCSERV either, so instead of trying to enumerate the platforms that don't, just test for the value itself. Patch by Dave Evans at MacPorts. Fixes #2172
-
- Mar 26, 2014
-
-
Timothy B. Terriberry authored
Makes style slightly more consistent. Also fixes the return code of op_fetch_headers() to make it consistently return OP_EBADHEADER if the stream runs out of pages after a valid OpusHead packet is found. Previously, if a valid OpusHead was found, it would return OP_ENOTFORMAT if it ran out of pages before finding one without its BOS flag set, and OP_EBADHEADER if it ran out of pages after finding one without its BOS flag set.
-
- Mar 25, 2014
-
-
Timothy B. Terriberry authored
width=height=depth=colors=0 should be allowed, but wasn't thanks to some missing parentheses. Thanks to Lithopsian for the report.
-
- Mar 16, 2014
-
-
Timothy B. Terriberry authored
We were skipping the BOS page for non-Opus streams, but never read in the next page, causing setup to fail with a duplicate serial number validation error. Thanks to Lithopsian for the report.
-
- Mar 12, 2014
-
-
Timothy B. Terriberry authored
-
- Mar 03, 2014
-
-
Timothy B. Terriberry authored
It helps to increment the comment count. Thanks to lithopsian for the report.
-
- Jan 11, 2014
-
-
Timothy B. Terriberry authored
Thanks to gmaxwell for the report.
-
- Jan 08, 2014
-
-
Timothy B. Terriberry authored
These should use the same macros as the rest of the code.
-
- Nov 20, 2013
-
-
Timothy B. Terriberry authored
RFC 6555 "Happy Eyeballs" has a few recommendations for implementing dual requests to hosts with both IPv4 and IPv6 DNS entries that differ slightly from how we used to do it. This commit updates things to follow those recommendations.
-
Timothy B. Terriberry authored
Otherwise redirects we'll stuff two requests into the same buffer if there's a redirect to another https URL via a proxy.
-
Timothy B. Terriberry authored
This separates the state for whether pipelining might be supported (HTTP 1.1 responses with a Server header) and for whether it's been explicitly disabled (Server headers from known-bad servers). This does a better job with repeated (and possibly contradictory) headers.
-
Timothy B. Terriberry authored
-
- Sep 03, 2013
-
-
Timothy B. Terriberry authored
For many Latin1 characters this still worked correctly by pure luck. Unfortunately, that included my test case.
-
Timothy B. Terriberry authored
It was only guaranteed to work in the seekable case. Thanks to Radio Stadtfilter 96.3Mhz for sending a stream which triggered this failure.
-
Timothy B. Terriberry authored
All the actual filters are named op_foo_filter(), so op_read_native_filter() looked like another one. Changing the word order should remove the ambiguity.
-
Timothy B. Terriberry authored
Don't know if this actually leads to any better code generation, but it may make the code a little clearer.
-
Timothy B. Terriberry authored
This makes it clear they don't modify the state, which is a useful indicator of what is safe to call from the application decode callback.
-
Timothy B. Terriberry authored
This is a little easier to read, and allows us to save some subtractions and a comparison.
-
Timothy B. Terriberry authored
The increasingly-inaccurately named op_shaped_dither16() can serve this role instead, without much additional complexity (perhaps less, once you consider the required shuffling around of the function parameters).
-
Timothy B. Terriberry authored
This is to correspond to the feature in opus-tools's opusdec. opusdec itself probably won't be able to use it, because it still wants to do dithering after resampling, but the motivation for the feature is the same.
-
Timothy B. Terriberry authored
Previously I'd said this would require a large stack buffer, which was true if you simply wanted to re-use the existing op_short2float_filter() and floating-point op_stereo_filter(). But the latter is not normally compiled for fixed-point anyway, so we can instead write new code that doesn't need the stack buffer without harming anything.
-