[vlc-commits] vout: remove no longer needed hack

Rémi Denis-Courmont git at videolan.org
Thu Oct 23 20:19:38 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Oct 23 21:03:07 2014 +0300| [2f1fdf0194a7f17c312bcb85144eed79b19e77fb] | committer: Rémi Denis-Courmont

vout: remove no longer needed hack

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

 src/video_output/vout_intf.c |   15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c
index 89a6e44..f7b0bb7 100644
--- a/src/video_output/vout_intf.c
+++ b/src/video_output/vout_intf.c
@@ -149,7 +149,7 @@ static void AddCustomRatios( vout_thread_t *p_vout, const char *psz_var,
 
 void vout_IntfInit( vout_thread_t *p_vout )
 {
-    vlc_value_t val, text, old_val;
+    vlc_value_t val, text;
     char *psz_buf;
 
     /* Create a few object variables we'll need later on */
@@ -182,19 +182,12 @@ void vout_IntfInit( vout_thread_t *p_vout )
 
     text.psz_string = _("Zoom");
     var_Change( p_vout, "zoom", VLC_VAR_SETTEXT, &text, NULL );
-    old_val.f_float = var_GetFloat( p_vout, "zoom" );
 
     for( size_t i = 0; i < ARRAY_SIZE(p_zoom_values); i++ )
     {
         val.f_float = p_zoom_values[i].f_value;
         text.psz_string = vlc_gettext( p_zoom_values[i].psz_label );
-        /* FIXME: This DELCHOICE hack corrupts the the "zoom" variable value
-         * for a short time window. Same for "crop" and "aspect-ratio". */
-        if( old_val.f_float == val.f_float )
-            var_Change( p_vout, "zoom", VLC_VAR_DELCHOICE, &old_val, NULL );
         var_Change( p_vout, "zoom", VLC_VAR_ADDCHOICE, &val, &text );
-        if( old_val.f_float == val.f_float )
-            var_Change( p_vout, "zoom", VLC_VAR_SETVALUE, &old_val, NULL );
     }
 
     var_AddCallback( p_vout, "zoom", ZoomCallback, NULL );
@@ -217,9 +210,6 @@ void vout_IntfInit( vout_thread_t *p_vout )
     text.psz_string = _("Crop");
     var_Change( p_vout, "crop", VLC_VAR_SETTEXT, &text, NULL );
 
-    val.psz_string = (char*)"";
-    var_Change( p_vout, "crop", VLC_VAR_DELCHOICE, &val, 0 );
-
     for( size_t i = 0; i < ARRAY_SIZE(p_crop_values); i++ )
     {
         val.psz_string = (char*)p_crop_values[i].psz_value;
@@ -247,9 +237,6 @@ void vout_IntfInit( vout_thread_t *p_vout )
     text.psz_string = _("Aspect ratio");
     var_Change( p_vout, "aspect-ratio", VLC_VAR_SETTEXT, &text, NULL );
 
-    val.psz_string = (char*)"";
-    var_Change( p_vout, "aspect-ratio", VLC_VAR_DELCHOICE, &val, 0 );
-
     for( size_t i = 0; i < ARRAY_SIZE(p_aspect_ratio_values); i++ )
     {
         val.psz_string = (char*)p_aspect_ratio_values[i].psz_value;



More information about the vlc-commits mailing list