Commit 12d9b7a9 authored by Steve Lhomme's avatar Steve Lhomme
Browse files

fps: only set the start date if there wasn't one set

If pictures are far in the future without a flush we fill the gap with extra
pictures according to the "framerate" tick.

Otherwise that code was never called since the condition to reset the clock was
the same used to produce extra pictures.
parent 06aa3932
......@@ -90,21 +90,18 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_picture)
/* First time we get some valid timestamp, we'll take it as base for output
later on we retake new timestamp if it has jumped too much */
if( unlikely( ( date_Get( &p_sys->next_output_pts ) == VLC_TICK_INVALID ) ||
( src_date > ( date_Get( &p_sys->next_output_pts ) + p_sys->i_output_frame_interval ) )
) )
if( unlikely( date_Get( &p_sys->next_output_pts ) == VLC_TICK_INVALID ) )
{
msg_Dbg( p_filter, "Resetting timestamps" );
date_Set( &p_sys->next_output_pts, src_date );
if( p_sys->p_previous_pic )
picture_Release( p_sys->p_previous_pic );
// p_picture will be returned so we need a reference
p_sys->p_previous_pic = picture_Hold( p_picture );
SetOutputDate( p_sys, p_picture );
return p_picture;
}
/* Check if we can skip input as better should follow */
if( src_date <
else if( src_date <
( date_Get( &p_sys->next_output_pts ) - p_sys->i_output_frame_interval ) )
{
if( p_sys->p_previous_pic )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment