Commit f5060d12 authored by Laurent Aimar's avatar Laurent Aimar

Improved preroll in avcodec.

Do not decode non reference pictures while prerolling.
It improves seek performance when decoding with ffmpeg.
parent 2f8325c3
......@@ -498,6 +498,11 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
p_sys->p_context->skip_frame = p_sys->i_skip_frame;
b_null_size = true;
}
else if( !b_drawpicture )
{
p_sys->p_context->skip_frame = __MAX( p_sys->p_context->skip_frame,
AVDISCARD_NONREF );
}
/*
* Do the actual decoding now
......@@ -562,8 +567,9 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
if( i_used < 0 )
{
msg_Warn( p_dec, "cannot decode one frame (%d bytes)",
p_sys->i_buffer );
if( b_drawpicture )
msg_Warn( p_dec, "cannot decode one frame (%d bytes)",
p_sys->i_buffer );
block_Release( p_block );
return NULL;
}
......
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