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

Marvin Scholz epirat07 at gmail.com
Sun Aug 18 20:26:53 CEST 2019



On 18 Aug 2019, at 19:31, Marc Aldorasi wrote:

> Ping for review

Is this related to "[PATCH] input: merge position and length events" or 
did
you sent this as reply to that by accident?

>
> On Mon, Aug 5, 2019 at 11:39 PM Marc Aldorasi <m101010a at gmail.com> 
> 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 | 14 ++++++--------
>>  1 file changed, 6 insertions(+), 8 deletions(-)
>>
>> diff --git a/modules/codec/avcodec/video.c 
>> b/modules/codec/avcodec/video.c
>> index 2232b7a291..d9be9d4a61 100644
>> --- a/modules/codec/avcodec/video.c
>> +++ b/modules/codec/avcodec/video.c
>> @@ -1031,15 +1031,13 @@ static int DecodeBlock( decoder_t *p_dec, 
>> block_t **pp_block )
>>      else
>>          b_need_output_picture = false;
>>
>> -    /* Change skip_frame config only if hurry_up is enabled */
>> -    if( p_sys->b_hurry_up )
>> -    {
>> -        p_context->skip_frame = p_sys->i_skip_frame;
>> +    p_context->skip_frame = p_sys->i_skip_frame;
>>
>> -        /* Check also if we should/can drop the block and move to 
>> next block
>> -            as trying to catchup the speed*/
>> -        if( p_dec->b_frame_drop_allowed )
>> -            p_block = filter_earlydropped_blocks( p_dec, p_block );
>> +    /* Check if we should/can drop the block and move to the next 
>> block
>> +       to try to catchup */
>> +    if( p_sys->b_hurry_up && p_dec->b_frame_drop_allowed )
>> +    {
>> +        p_block = filter_earlydropped_blocks( p_dec, p_block );
>>      }
>>
>>      if( !b_need_output_picture || p_sys->framedrop == 
>> FRAMEDROP_NONREF )
>> --
>> 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