[vlc-devel] [PATCH 2/3] codec: avcodec: extract frame from decoder on drop
Francois Cartegnie
fcvlcdev at free.fr
Fri Jan 15 16:27:49 CET 2016
Allows early recover on Delayed codecs instead
of just skipping i_late_frames.
---
modules/codec/avcodec/video.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 534bf85..5e442bd 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -577,11 +577,15 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
{
p_sys->i_pts = VLC_TS_INVALID; /* To make sure we recover properly */
if( p_block )
+ {
block_Release( p_block );
+ *pp_block = p_block = NULL;
+ }
p_sys->i_late_frames--;
msg_Err( p_dec, "more than 5 seconds of late video -> "
"dropping frame (computer too slow ?)" );
- return NULL;
+ if( (p_sys->p_codec->capabilities & CODEC_CAP_DELAY) == 0 )
+ return NULL;
}
b_drawpicture = ( !p_block || !(p_block->i_flags & BLOCK_FLAG_PREROLL) );
--
2.5.0
More information about the vlc-devel
mailing list