Re: [Spice-devel] [spice-gtk 1/2] Fix possible multimedia time overflow

2017-03-17 Thread Frediano Ziglio
> > On 16 Mar 2017, at 11:56, Frediano Ziglio < fzig...@redhat.com > wrote: > > > > - Original Message - > > > > > > > > Hi > > > > > > > > > > > > > > > - Original Message - > > > > > > > > > > > > > > > > The multimedia time can easily overflow as is encoded in an >

Re: [Spice-devel] [spice-gtk 1/2] Fix possible multimedia time overflow

2017-03-17 Thread Christophe de Dinechin
> On 16 Mar 2017, at 11:56, Frediano Ziglio > wrote: > >> >> - Original Message - Hi - Original Message - > The multimedia time can easily overflow as is encoded in an > unsigned 32 bit and have a unit of milliseconds so i

Re: [Spice-devel] [spice-gtk 1/2] Fix possible multimedia time overflow

2017-03-16 Thread Marc-André Lureau
Hi - Original Message - > > > > Hi > > > > - Original Message - > > > > > > > > > > > > > > 3 - 4294967295 == 4 is not a portable assumption. Neither is > > > > > > > (uint32_t) 3 - (uint32_t) 4294967295 == 4 > > > > > > > > > > > > Ok, I am not an expert in portability, do you

Re: [Spice-devel] [spice-gtk 1/2] Fix possible multimedia time overflow

2017-03-16 Thread Frediano Ziglio
> > Hi > > - Original Message - > > > > > > > > > > > > 3 - 4294967295 == 4 is not a portable assumption. Neither is > > > > > > (uint32_t) 3 - (uint32_t) 4294967295 == 4 > > > > > > > > > > Ok, I am not an expert in portability, do you have an example where > > > > > this > > > > > wou

Re: [Spice-devel] [spice-gtk 1/2] Fix possible multimedia time overflow

2017-03-16 Thread Marc-André Lureau
Hi - Original Message - > > > > > > > > > > 3 - 4294967295 == 4 is not a portable assumption. Neither is > > > > > (uint32_t) 3 - (uint32_t) 4294967295 == 4 > > > > > > > > Ok, I am not an expert in portability, do you have an example where > > > > this > > > > would give different resul

Re: [Spice-devel] [spice-gtk 1/2] Fix possible multimedia time overflow

2017-03-16 Thread Frediano Ziglio
> > Hi > > - Original Message - > > > > > > - Original Message - > > > > > > > > > > Hi > > > > > > > > > > - Original Message - > > > > > > The multimedia time can easily overflow as is encoded in an > > > > > > unsigned 32 bit and have a unit of milliseconds so it wra

Re: [Spice-devel] [spice-gtk 1/2] Fix possible multimedia time overflow

2017-03-16 Thread Marc-André Lureau
Hi - Original Message - > > > > - Original Message - > > > > > > > > Hi > > > > > > > > - Original Message - > > > > > The multimedia time can easily overflow as is encoded in an > > > > > unsigned 32 bit and have a unit of milliseconds so it wrap > > > > > up every 49 d

Re: [Spice-devel] [spice-gtk 1/2] Fix possible multimedia time overflow

2017-03-16 Thread Frediano Ziglio
> > - Original Message - > > > > > > Hi > > > > > > - Original Message - > > > > The multimedia time can easily overflow as is encoded in an > > > > unsigned 32 bit and have a unit of milliseconds so it wrap > > > > up every 49 days. Use some math that allow the number to overflo

Re: [Spice-devel] [spice-gtk 1/2] Fix possible multimedia time overflow

2017-03-16 Thread Marc-André Lureau
- Original Message - > > > > Hi > > > > - Original Message - > > > The multimedia time can easily overflow as is encoded in an > > > unsigned 32 bit and have a unit of milliseconds so it wrap > > > up every 49 days. Use some math that allow the number to overflow > > > without i

Re: [Spice-devel] [spice-gtk 1/2] Fix possible multimedia time overflow

2017-03-16 Thread Frediano Ziglio
> > Hi > > - Original Message - > > The multimedia time can easily overflow as is encoded in an > > unsigned 32 bit and have a unit of milliseconds so it wrap > > up every 49 days. Use some math that allow the number to overflow > > without issues. > > This could caused the client to stop

Re: [Spice-devel] [spice-gtk 1/2] Fix possible multimedia time overflow

2017-03-15 Thread Marc-André Lureau
Hi - Original Message - > The multimedia time can easily overflow as is encoded in an > unsigned 32 bit and have a unit of milliseconds so it wrap > up every 49 days. Use some math that allow the number to overflow > without issues. > This could caused the client to stop handling streaming

[Spice-devel] [spice-gtk 1/2] Fix possible multimedia time overflow

2017-03-15 Thread Frediano Ziglio
The multimedia time can easily overflow as is encoded in an unsigned 32 bit and have a unit of milliseconds so it wrap up every 49 days. Use some math that allow the number to overflow without issues. This could caused the client to stop handling streaming and starting only queueing. Signed-off-by