[MPlayer-dev-eng] PTS system broken..

Arpi arpi at thot.banki.hu
Fri Mar 1 00:03:12 CET 2002


Hi,

> frame_time out of video_read_frame is .040001 instead of .04.  So
> sh_video->timer is now off, and v_timer_corr is way off as well.  Where
> it is supposed to be zero, it ends up .000001  causing an errant duplicate
> frame:
> 
>     in_size=video_read_frame(sh_video,&frame_time,&start,force_fps);
>     if(in_size<0){ eof=1; break; }
>     sh_video->timer+=frame_time; ++decoded_frameno;
>    
>     v_timer_corr-=frame_time-(float)mux_v->h.dwScale/mux_v->h.dwRate;

ok, in your case, v_timer_corr=0.000001
but why does it cause any skip or drop ?

// check frame duplicate/drop:

if(v_timer_corr>=(float)mux_v->h.dwScale/mux_v->h.dwRate){
    v_timer_corr-=(float)mux_v->h.dwScale/mux_v->h.dwRate;
    ++skip_flag; // skip
} else
while(v_timer_corr<=-(float)mux_v->h.dwScale/mux_v->h.dwRate){
    v_timer_corr+=(float)mux_v->h.dwScale/mux_v->h.dwRate;
    --skip_flag; // dup
}

it won't skip or drop until it reaches one frame time + or -.

anyway it's double, not float.


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list