diff gui/interface.c @ 33244:cee07c3dbff5

Do not remove video filters. If a video filter option isn't set, it does not mean to remove the filter, but such option (if set) should only cause adding the filter (if not already present). That way filters can be specified in MPlayer's config or on the command line, too. This closes Bugzilla #1442.
author ib
date Mon, 25 Apr 2011 14:25:15 +0000
parents 5f9eaf3eea63
children 5f527a9a9521
line wrap: on
line diff
--- a/gui/interface.c	Mon Apr 25 12:38:55 2011 +0000
+++ b/gui/interface.c	Mon Apr 25 14:25:15 2011 +0000
@@ -536,46 +536,6 @@
     mp_msg(MSGT_GPLAYER, MSGL_STATUS, MSGTR_AddingVideoFilter, str);
 }
 
-static void remove_vf(char *str)
-{
-    int n = 0;
-
-    if (!vf_settings)
-        return;
-
-    mp_msg(MSGT_GPLAYER, MSGL_STATUS, MSGTR_RemovingVideoFilter, str);
-
-    while (vf_settings[n++].name) ;
-
-    n--;
-
-    if (n > -1) {
-        int i = 0, m = -1;
-
-        while (vf_settings[i].name) {
-            if (!gstrcmp(vf_settings[i++].name, str)) {
-                m = i - 1;
-                break;
-            }
-        }
-
-        i--;
-
-        if (m > -1) {
-            if (n == 1) {
-                free(vf_settings[0].name);
-                free(vf_settings[0].attribs);
-                free(vf_settings);
-                vf_settings = NULL;
-            } else {
-                free(vf_settings[i].name);
-                free(vf_settings[i].attribs);
-                memcpy(&vf_settings[i], &vf_settings[i + 1], (n - i) * sizeof(m_obj_settings_t));
-            }
-        }
-    }
-}
-
 int guiGetEvent(int type, void *arg)
 {
     const ao_functions_t *audio_out = NULL;
@@ -911,8 +871,6 @@
         }
 
 #ifdef CONFIG_DXR3
-        remove_vf("lavc");
-
         if (video_driver_list && !gstrcmp(video_driver_list[0], "dxr3"))
             if (guiIntfStruct.StreamType != STREAMTYPE_DVD && guiIntfStruct.StreamType != STREAMTYPE_VCD)
                 if (gtkVfLAVC)
@@ -921,8 +879,6 @@
 
         if (gtkVfPP)
             add_vf("pp");
-        else
-            remove_vf("pp");
 
         // audio opts