[vlc-devel] [PATCH] Reset p_context->skip_frame when done seeking

Steve Lhomme robux4 at ycbcr.xyz
Mon Aug 5 07:43:33 CEST 2019


Hi,

On 2019-08-04 20:11, Marc Aldorasi wrote:
> Previously, if p_sys->b_hurry_up was false and we weren't seeking, the
> value of p_context->skip_frame would not be modified.  This means that
> if we started seeking we would set p_context->skip_frame to
> AVDISCARD_NONREF, and then when we finished seeking we wouldn't change
> p_context->skip_frame and it would still be skipping non-reference
> frames, causing choppy playback.  This patch resets
> p_context->skip_frame when we're not seeking so playback is smooth.
> ---
>   modules/codec/avcodec/video.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
> index 2232b7a291..b3fa4576e9 100644
> --- a/modules/codec/avcodec/video.c
> +++ b/modules/codec/avcodec/video.c
> @@ -1031,6 +1031,7 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block )
>       else
>           b_need_output_picture = false;
>   
> +    p_context->skip_frame = AVDISCARD_DEFAULT;

It's a good idea to reset the skip_frame once seeking is done, but it 
should revert to "p_sys->i_skip_frame" so that it respects the 
"avcodec-skip-frame" variable.

>       /* Change skip_frame config only if hurry_up is enabled */
>       if( p_sys->b_hurry_up )
>       {
> -- 
> 2.22.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