[vlc-devel] [PATCH] avcodec: "avcodec-skip-frame" is read once into i_skip_frame
Steve Lhomme
robux4 at videolabs.io
Thu Sep 14 15:02:09 CEST 2017
p_context->skip_frame is the value that may change during decoding
---
modules/codec/avcodec/video.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 3bd4d10cb1..e51edd4b59 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -490,13 +490,13 @@ int InitVideoDec( vlc_object_t *obj )
p_sys->b_show_corrupted = var_CreateGetBool( p_dec, "avcodec-corrupted" );
i_val = var_CreateGetInteger( p_dec, "avcodec-skip-frame" );
- if( i_val >= 4 ) p_context->skip_frame = AVDISCARD_ALL;
- else if( i_val == 3 ) p_context->skip_frame = AVDISCARD_NONKEY;
- else if( i_val == 2 ) p_context->skip_frame = AVDISCARD_BIDIR;
- else if( i_val == 1 ) p_context->skip_frame = AVDISCARD_NONREF;
- else if( i_val == -1 ) p_context->skip_frame = AVDISCARD_NONE;
- else p_context->skip_frame = AVDISCARD_DEFAULT;
- p_sys->i_skip_frame = p_context->skip_frame;
+ if( i_val >= 4 ) p_sys->i_skip_frame = AVDISCARD_ALL;
+ else if( i_val == 3 ) p_sys->i_skip_frame = AVDISCARD_NONKEY;
+ else if( i_val == 2 ) p_sys->i_skip_frame = AVDISCARD_BIDIR;
+ else if( i_val == 1 ) p_sys->i_skip_frame = AVDISCARD_NONREF;
+ else if( i_val == -1 ) p_sys->i_skip_frame = AVDISCARD_NONE;
+ else p_sys->i_skip_frame = AVDISCARD_DEFAULT;
+ p_context->skip_frame = p_sys->i_skip_frame;
i_val = var_CreateGetInteger( p_dec, "avcodec-skip-idct" );
if( i_val >= 4 ) p_context->skip_idct = AVDISCARD_ALL;
--
2.12.1
More information about the vlc-devel
mailing list