[MPlayer-dev-eng] [PATCH] 64-bit get time 2nd try

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Oct 17 18:40:01 CEST 2010


On Sun, Oct 17, 2010 at 06:20:54PM +0200, Dan Oscarsson wrote:
> 1) I record last vsync I have output a frame to. Best way I have is time
> of vsync. Now when I use 32-bit timestamps, this value may wrap during a
> very long pause. If it wraps and my tests for wrapped values misses,
> there may be several dropped video frames. As I guess people seldom do a
> very long pause it may not matter.

My gut feeling is that it should never cause several frames to be
dropped.
At least not if it before was possible to basically play the
whole video without having to do such a thing.
That said, pause/unpause events are passed all the way up, including
to the VO itself, so you could react to that (though on the other hand
a frontend could easily cause e.g. a "pause" of only 1 ms, while
e.g. a udp stream might just stop playing due to network issues
for a long time without someone ever actually pausing, so relying
on this is suboptimal).

> 2) For some timestamps I used the value 0 to mean "first time", as
> timestamps now wrap and may have 0 anytime, I will have to use a
> separate variable for each timestamp where I need to maintain state for
> "first time".

Assuming you really need to know "first time" and assuming you can't
ensure that they will all be initialized at the same time, yes.


More information about the MPlayer-dev-eng mailing list