Commit bc846238 authored by Steve Lhomme's avatar Steve Lhomme

decoder: check missing picture dates early

Especially before we check this date against the i_preroll_end.
parent 97f0fc99
......@@ -979,6 +979,14 @@ static int DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture
vout_thread_t *p_vout = p_owner->p_vout;
bool prerolled;
if( p_picture->date == VLC_TICK_INVALID )
/* FIXME: VLC_TICK_INVALID -- verify video_output */
{
msg_Warn( p_dec, "non-dated video buffer received" );
picture_Release( p_picture );
return VLC_EGENERIC;
}
vlc_mutex_lock( &p_owner->lock );
if( p_owner->i_preroll_end > p_picture->date )
{
......@@ -999,12 +1007,6 @@ static int DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture
vout_FlushAll( p_vout );
}
if( p_picture->date == VLC_TICK_INVALID )
{
msg_Warn( p_dec, "non-dated video buffer received" );
goto discard;
}
/* */
vlc_mutex_lock( &p_owner->lock );
......
Markdown is supported
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