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

Marc Aldorasi m101010a at gmail.com
Sun Aug 4 20:11:56 CEST 2019


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



More information about the vlc-devel mailing list