vlc | branch: master | Victorien Le Couviour--Tuffet <victorien.lecouviour.tuf...@gmail.com> | Thu Jun 22 09:24:38 2017 +0200| [351b63f4768ff3c46953a6f920356027c20528d6] | committer: Thomas Guillem
adjust: don't create variables if invalid chroma Signed-off-by: Thomas Guillem <tho...@gllm.fr> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=351b63f4768ff3c46953a6f920356027c20528d6 --- modules/video_filter/adjust.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/video_filter/adjust.c b/modules/video_filter/adjust.c index 82318aa6e6..e0074e28e3 100644 --- a/modules/video_filter/adjust.c +++ b/modules/video_filter/adjust.c @@ -145,19 +145,6 @@ static int Create( vlc_object_t *p_this ) return VLC_ENOMEM; p_sys = p_filter->p_sys; - /* needed to get options passed in transcode using the - * adjust{name=value} syntax */ - config_ChainParse( p_filter, "", ppsz_filter_options, - p_filter->p_cfg ); - - p_sys->f_contrast = var_CreateGetFloatCommand( p_filter, "contrast" ); - p_sys->f_brightness = var_CreateGetFloatCommand( p_filter, "brightness" ); - p_sys->f_hue = var_CreateGetFloatCommand( p_filter, "hue" ); - p_sys->f_saturation = var_CreateGetFloatCommand( p_filter, "saturation" ); - p_sys->f_gamma = var_CreateGetFloatCommand( p_filter, "gamma" ); - p_sys->b_brightness_threshold = - var_CreateGetBoolCommand( p_filter, "brightness-threshold" ); - /* Choose Planar/Packed function and pointer to a Hue/Saturation processing * function*/ switch( p_filter->fmt_in.video.i_chroma ) @@ -192,6 +179,19 @@ static int Create( vlc_object_t *p_this ) } vlc_mutex_init( &p_sys->lock ); + + /* needed to get options passed in transcode using the + * adjust{name=value} syntax */ + config_ChainParse( p_filter, "", ppsz_filter_options, p_filter->p_cfg ); + + p_sys->f_contrast = var_CreateGetFloatCommand( p_filter, "contrast" ); + p_sys->f_brightness = var_CreateGetFloatCommand( p_filter, "brightness" ); + p_sys->f_hue = var_CreateGetFloatCommand( p_filter, "hue" ); + p_sys->f_saturation = var_CreateGetFloatCommand( p_filter, "saturation" ); + p_sys->f_gamma = var_CreateGetFloatCommand( p_filter, "gamma" ); + p_sys->b_brightness_threshold = + var_CreateGetBoolCommand( p_filter, "brightness-threshold" ); + var_AddCallback( p_filter, "contrast", AdjustCallback, p_sys ); var_AddCallback( p_filter, "brightness", AdjustCallback, p_sys ); var_AddCallback( p_filter, "hue", AdjustCallback, p_sys ); _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits