search for: op_unlikely

Displaying 8 results from an estimated 8 matches for "op_unlikely".

Did you mean: op_likely
2019 Jun 07
1
Problem with opusfile & ndk
Hi Xiph.org Team. We are using opusfile library <https://github.com/xiph/opusfile> for streaming *.opus* audio in our projects. But now we have a problem with building opusfile library for android with *ndk-build*. In particular, with arm64-v8a platform: Google removed <sys/timeb.h> from android. And now building opusfile with nkd-build crashes with error "fatal error:
2017 Dec 07
2
[PATCH 0/2] libopusfile int64 overflows
On Tue, Nov 28, 2017 at 3:22 PM, James Zern <jzern at google.com> wrote: > On Mon, Nov 20, 2017 at 1:07 PM, James Zern <jzern at google.com> wrote: >> Just an attempt to avoid overflows with an explicit check, I don't know if >> there's a better way to identify corrupt input here. >> >> James Zern (2): >> op_pcm_seek: fix int64 overflow
2017 Nov 20
7
[PATCH 0/2] libopusfile int64 overflows
Just an attempt to avoid overflows with an explicit check, I don't know if there's a better way to identify corrupt input here. James Zern (2): op_pcm_seek: fix int64 overflow op_fetch_and_process_page: fix int64 overflow src/opusfile.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) -- 2.15.0.448.gf294e3d99a-goog
2017 Dec 07
1
[PATCH 0/2] libopusfile int64 overflows
...would be better just to do a full seek.*/ >> if(OP_LIKELY(!op_granpos_diff(&diff,gp,pcm_start))){ >> ogg_int64_t discard_count; >> - discard_count=_pcm_offset-diff; >> + /*Check for overflow.*/ >> + if(diff<0&&OP_UNLIKELY(OP_INT64_MAX+diff<_pcm_offset)){ >> + discard_count=0; >> + } >> + else discard_count=_pcm_offset-diff; >> /*We use a threshold of 90 ms instead of 80, since 80 ms is the >> _minimum_ we would have discarded after a full s...
2017 Dec 07
0
[PATCH 0/2] libopusfile int64 overflows
...pcm_offset){ > would be better just to do a full seek.*/ > if(OP_LIKELY(!op_granpos_diff(&diff,gp,pcm_start))){ > ogg_int64_t discard_count; > - discard_count=_pcm_offset-diff; > + /*Check for overflow.*/ > + if(diff<0&&OP_UNLIKELY(OP_INT64_MAX+diff<_pcm_offset)){ > + discard_count=0; > + } > + else discard_count=_pcm_offset-diff; > /*We use a threshold of 90 ms instead of 80, since 80 ms is the > _minimum_ we would have discarded after a full seek. >...
2017 Jan 02
1
[PATCH] Use ASN1_STRING_get0_data for openssl-1.1.0
...,_init) ((_b)->init=(_init)) +# define ASN1_STRING_get0_data ASN1_STRING_data # endif static int op_bio_retry_new(BIO *_b){ @@ -1632,7 +1635,7 @@ static int op_http_hostname_match(const char *_host,size_t _host_len, size_t pattern_prefix_len; size_t pattern_suffix_len; if(OP_UNLIKELY(_host_len>(size_t)INT_MAX))return 0; - pattern=(const char *)ASN1_STRING_data(_pattern); + pattern=(const char *)ASN1_STRING_get0_data(_pattern); pattern_len=strlen(pattern); /*Check the pattern for embedded NULs.*/ if(OP_UNLIKELY(pattern_len!=(size_t)ASN1_STRING_length(_pattern)))ret...
2017 Nov 20
0
[PATCH 1/2] op_pcm_seek: fix int64 overflow
...OggOpusFile *_of,ogg_int64_t _pcm_offset){ would be better just to do a full seek.*/ if(OP_LIKELY(!op_granpos_diff(&diff,gp,pcm_start))){ ogg_int64_t discard_count; - discard_count=_pcm_offset-diff; + /*Check for overflow.*/ + if(diff<0&&OP_UNLIKELY(OP_INT64_MAX+diff<_pcm_offset)){ + discard_count=0; + } + else discard_count=_pcm_offset-diff; /*We use a threshold of 90 ms instead of 80, since 80 ms is the _minimum_ we would have discarded after a full seek. Assuming 20 ms frames (the de...
2017 Nov 20
0
[PATCH 2/2] op_fetch_and_process_page: fix int64 overflow
...ic int op_fetch_and_process_page(OggOpusFile *_of, &&OP_LIKELY(diff<total_duration)){ cur_packet_gp=prev_packet_gp; for(pi=0;pi<op_count;pi++){ - diff=durations[pi]-diff; + /*Check for overflow.*/ + if(diff<0&&OP_UNLIKELY(OP_INT64_MAX+diff<durations[pi])){ + diff=0; + } else diff=durations[pi]-diff; /*If we have samples to trim...*/ if(diff>0){ /*If we trimmed the entire packet, stop (the spec says encoders -- 2.15.0.448.gf294e3d99a-goog