[vlc-commits] avcodec: "avcodec-skip-frame" is read once into i_skip_frame
Steve Lhomme
git at videolan.org
Fri Oct 13 00:53:18 CEST 2017
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Thu Sep 14 15:02:09 2017 +0200| [57954251e6a8bf91192eeaf380e00775cab96c28] | committer: Jean-Baptiste Kempf
avcodec: "avcodec-skip-frame" is read once into i_skip_frame
p_context->skip_frame is the value that may change during decoding
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=57954251e6a8bf91192eeaf380e00775cab96c28
---
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 e24319169e..501618fb8f 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -497,13 +497,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;
More information about the vlc-commits
mailing list