]> git.sesse.net Git - vlc/commitdiff
vout: remove no longer needed hack
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 23 Oct 2014 18:03:07 +0000 (21:03 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 23 Oct 2014 18:04:27 +0000 (21:04 +0300)
src/video_output/vout_intf.c

index 89a6e448d690d3506399159cffe9b3c0c8874ce1..f7b0bb7866a7e582169624350cc5731a073f8c82 100644 (file)
@@ -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;