[vlc-devel] commit: Improved preroll in avcodec. (Laurent Aimar )
git version control
git at videolan.org
Sat Mar 14 20:45:34 CET 2009
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Mar 14 20:43:15 2009 +0100| [f5060d12c31af094d9105143c88371487ff2c72c] | committer: Laurent Aimar
Improved preroll in avcodec.
Do not decode non reference pictures while prerolling.
It improves seek performance when decoding with ffmpeg.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f5060d12c31af094d9105143c88371487ff2c72c
---
modules/codec/avcodec/video.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index d28be23..2c9c831 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -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;
}
More information about the vlc-devel
mailing list