vlc | branch: master | Francois Cartegnie <[email protected]> | Fri May 19 10:22:29 2017 +0200| [20a5b07fec6e081cc72a7511f676cb80fe837471] | committer: Francois Cartegnie
input: decoder: fix end of preroll on discontinuity End of preroll time was not updated properly. Initial discontinuities were notified through es_out/input_DecoderDiscontinuity 79cb45a41bdeaca63eb5fa2f3c53913ce463c6a5 using a forged empty block with discontinuity flag. Current decoders/demuxers discontinuity flag is set on first block after discontinuity, and is no longer empty data. We need to test for this. refs #18245 First spu dropped on preroll (preroll > INT_MIN) (due to another special case/preroll incompatibility) > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=20a5b07fec6e081cc72a7511f676cb80fe837471 --- src/input/decoder.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/input/decoder.c b/src/input/decoder.c index 187285790c..01645cf04e 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -719,7 +719,11 @@ static int DecoderTimedWait( decoder_t *p_dec, mtime_t deadline ) static inline void DecoderUpdatePreroll( int64_t *pi_preroll, const block_t *p ) { - if( p->i_flags & (BLOCK_FLAG_PREROLL|BLOCK_FLAG_DISCONTINUITY) ) + if( p->i_flags & BLOCK_FLAG_PREROLL ) + *pi_preroll = INT64_MAX; + /* Check if we can use the packet for end of preroll */ + else if( (p->i_flags & BLOCK_FLAG_DISCONTINUITY) && + (p->i_buffer == 0 || (p->i_flags & BLOCK_FLAG_CORRUPTED)) ) *pi_preroll = INT64_MAX; else if( p->i_dts > VLC_TS_INVALID ) *pi_preroll = __MIN( *pi_preroll, p->i_dts ); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
