[vlc-commits] avcodec/encoder: remove useless datum

Rémi Denis-Courmont git at videolan.org
Sat Nov 4 13:29:59 CET 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov  4 14:27:41 2017 +0200| [2ca454a43e73bda3d6c253877dc59d28cea63ff3] | committer: Rémi Denis-Courmont

avcodec/encoder: remove useless datum

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2ca454a43e73bda3d6c253877dc59d28cea63ff3
---

 modules/codec/avcodec/encoder.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 37a0979559..5f2f671c91 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -142,7 +142,6 @@ struct encoder_sys_t
     bool       b_hurry_up;
     bool       b_interlace, b_interlace_me;
     float      f_i_quant_factor;
-    int        i_noise_reduction;
     bool       b_mpeg4_matrix;
     bool       b_trellis;
     int        i_quality; /* for VBR */
@@ -416,7 +415,6 @@ int OpenEncoder( vlc_object_t *p_this )
     p_sys->i_rc_buffer_size = var_GetInteger( p_enc, ENC_CFG_PREFIX "rc-buffer-size" );
     p_sys->f_rc_buffer_aggressivity = var_GetFloat( p_enc, ENC_CFG_PREFIX "rc-buffer-aggressivity" );
     p_sys->f_i_quant_factor = var_GetFloat( p_enc, ENC_CFG_PREFIX "i-quant-factor" );
-    p_sys->i_noise_reduction = var_GetInteger( p_enc, ENC_CFG_PREFIX "noise-reduction" );
     p_sys->b_mpeg4_matrix = var_GetBool( p_enc, ENC_CFG_PREFIX "mpeg4-matrix" );
 
     f_val = var_GetFloat( p_enc, ENC_CFG_PREFIX "qscale" );
@@ -559,7 +557,8 @@ int OpenEncoder( vlc_object_t *p_this )
         if ( p_sys->f_i_quant_factor != 0.f )
             p_context->i_quant_factor = p_sys->f_i_quant_factor;
 
-        add_av_option_int( p_enc, &options, "noise_reduction", p_sys->i_noise_reduction );
+        int nr = var_GetInteger( p_enc, ENC_CFG_PREFIX "noise-reduction" );
+        add_av_option_int( p_enc, &options, "noise_reduction", nr );
 
         if ( p_sys->b_mpeg4_matrix )
         {



More information about the vlc-commits mailing list