[vlc-devel] [PATCH] decoder: display subtitles on seek while paused

Thomas Guillem thomas at gllm.fr
Fri Apr 20 17:52:25 CEST 2018


Looks good to me.

On Fri, Apr 20, 2018, at 11:30, Romain Vimont wrote:
> While paused, make the SPU decoder process one block on seek, in order
> to display the matching subtitle immediately.
> ---
>  src/input/decoder.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/src/input/decoder.c b/src/input/decoder.c
> index 98817e6f39..456b103935 100644
> --- a/src/input/decoder.c
> +++ b/src/input/decoder.c
> @@ -2139,9 +2139,10 @@ void input_DecoderFlush( decoder_t *p_dec )
>       * a row. */
>      p_owner->flushing = true;
>  
> -    /* Flushing video decoder when paused: increment frames_countdown in order
> -     * to display one frame */
> -    if( p_owner->fmt.i_cat == VIDEO_ES && p_owner->paused
> +    /* Flush video/spu decoder when paused: increment frames_countdown in order
> +     * to display one frame/subtitle */
> +    if( p_owner->paused
> +     && ( p_owner->fmt.i_cat == VIDEO_ES || p_owner->fmt.i_cat == SPU_ES )
>       && p_owner->frames_countdown == 0 )
>          p_owner->frames_countdown++;
>  
> -- 
> 2.17.0
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list