Displaying 4 results from an estimated 4 matches for "target_gp".
Did you mean:
target_fb
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 Dec 07
1
[PATCH 0/2] libopusfile int64 overflows
...frames (the default), we'd discard 90 ms on
>> average.*/
>> if(discard_count>=0&&OP_UNLIKELY(discard_count<90*48)){
>
>
> I think that better than adding a custom overflow check here, we should use
> if(OP_LIKELY(!op_granpos_diff(&discard_count,target_gp,gp))) directly
> (because _pcm_offset == (target_gp - pcm_start) and diff == (gp -
> pcm_start).
>
This works.
> [...]
>
>> @@ -2078,7 +2078,10 @@ static int op_fetch_and_process_page(OggOpusFile
>> *_of,
>> &&OP_LIKELY(diff<total_duration)){...
2017 Dec 07
0
[PATCH 0/2] libopusfile int64 overflows
...> Assuming 20 ms frames (the default), we'd discard 90 ms on average.*/
> if(discard_count>=0&&OP_UNLIKELY(discard_count<90*48)){
I think that better than adding a custom overflow check here, we should
use if(OP_LIKELY(!op_granpos_diff(&discard_count,target_gp,gp)))
directly (because _pcm_offset == (target_gp - pcm_start) and diff == (gp
- pcm_start).
The way you have this now, if the gp of whatever current page we happen
to be decoding comes before the start of the stream, you'll set
discard_count to 0 and then we will pass the following if() a...
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