[MPlayer-users] A/V out of sync + corrupted time stamps on x86_64for some files [SOLVED]

Nico Sabbi nicola_sabbi at fastwebnet.it
Wed May 3 19:59:46 CEST 2006


Christian Aistleitner wrote:

>
> pts=(((c>>1)&7)<<30)|((d>>1)<<15)|(e>>1)
>
> As far as I can tell, c is an int and d and e are unsigned int.
>
> In my recorded file, in one packet, there
> c = 0x2D
> d = 0x49D
> e = 0x8539
> occurs.
>
> What is the result?
> v1.79 gives: FFFFFFFF8127429C (I assume, you see the sign problem)
> v1.78 gives: 8127429C (not correct, but the best possible value in  
> unsigned int)
> The correct value would be: 18127429C
>
> Maybe this should go to a devel mailing list, as this is actually a 
> patch  now...
> I am not a C exert, but I'd sugest, to replace the above line by
>
> pts=((((unsigned long long)c>>1)&7)<<30)|(((unsigned long  
> long)d>>1)<<15)|((unsigned long long)e>>1);
>
> Then:
> - no shifting is sign affected (<< shifts)
> - no shifting is limit to int (32-bit) precision (>> shifts)
>
> Finally, read_mpeg_timestamp gives 18127429C, as expected.

correct.
Fixed similarly in cvs. Thanks for reporting




More information about the MPlayer-users mailing list