[vlc-devel] Problem with not skipping frames with ffmpeg and fix suggestion

jboileau jboileau at gmail.com
Tue Sep 16 22:25:43 CEST 2008


Hi,

I have come accross a problem when settings the preference to not skip
frames. First there are 2 settings in video ( Drop late frames, Skip
frames) and two in ffmpeg ( Hurry up, Skip frame). Unchecking Drop
late frames in video removes 'late picture skipped' messages and does
help. But there remains some frame skipping with the message 'avcodec
error: more than 5 seconds of late video -> dropping frame (computer
too slow ?)'. I would have assumed that either 'Drop late frames'
and/or 'Hurry up' would let all frames play, but this is not the case.
I do have a code modification suggestion. But my question is : what
setting should be used in this code? Drop late frames or Hurry up?
Which makes more sense^ The code where I think a modif should be done
is in module/codec/avcodec/video.c line 568. I would add a test for
one of these settings:

original code:

/* Update frame late count (except when doing preroll) */
if( p_sys->i_pts && decoder_GetDisplayDate(p_dec, p_sys->i_pts) <= mdate() &&
    !(p_block->i_flags & BLOCK_FLAG_PREROLL) )
{
    p_sys->i_late_frames++;
    if( p_sys->i_late_frames == 1 )
        p_sys->i_late_frames_start = mdate();
}
else
{
    p_sys->i_late_frames = 0;
}

Suggested modification:

/* Update frame late count (except when doing preroll or if we don't
want to skip frames) */
if( p_sys->i_pts && decoder_GetDisplayDate(p_dec, p_sys->i_pts) <= mdate() &&
    !(p_block->i_flags & BLOCK_FLAG_PREROLL) && p_sys->b_hurry_up)
{
    p_sys->i_late_frames++;
    if( p_sys->i_late_frames == 1 )
        p_sys->i_late_frames_start = mdate();
}
else
{
    p_sys->i_late_frames = 0;
}

This example shows the use of Hurry up, but I guess it could be Drop
late frames. Hopefully someone with more experience than I with the
VLC architecture knows.

Jacques Boileau



More information about the vlc-devel mailing list