On Mon, 07 Jul 2008 08:56:39 -0400, Luca Abeni <[EMAIL PROTECTED]> wrote:
> Hi Vladimir,
>
> Vladimir Eremeev wrote:
> [...]
>>>> But why does negative value appear?
>>> Because you are printing the timestamp as a signed value ;-)
>>>
>>
>> Yes, that's right.
>> However, I thought, that sign bit is 63th.
>
> Sorry, but I do not get your point:
>> 8589927402(10) = 111111111111111111110001111101010(2)
>> The timestamps have a difference of 3600, so if I append 3600, I will  
>> get
>> 8589931002 ( 111111111111111111111000111111010)
> Which, printed as a signed integer is -3590

Only if your to-decimal function operates specifically on 33 bit values.   
Printf would not print a negative number unless it saw  
1111111111111111111111111111111111111111111111111111000111111010

I think the point is that something is sign-extending to 64 bits, and it  
seems wrong to sign-extend a timestamp which wraps.  Especially wrong that  
only one number in the sequence was sign-extended.

-- 
Michael Conrad
IntelliTree Solutions llc.
513-552-6362
[EMAIL PROTECTED]
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to