mirror of
https://github.com/mpv-player/mpv
synced 2024-12-14 02:45:43 +00:00
remove two unused functions.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21781 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
42552b211a
commit
6d9ce96d9f
@ -480,73 +480,6 @@ void guiDone(void)
|
||||
cfg_write();
|
||||
}
|
||||
|
||||
static void add_vf(char * str)
|
||||
{
|
||||
mp_msg(MSGT_GPLAYER, MSGL_STATUS, MSGTR_AddingVideoFilter, str);
|
||||
if (vf_settings)
|
||||
{
|
||||
int i = 0;
|
||||
while (vf_settings[i].name)
|
||||
if (!strcmp(vf_settings[i++].name, str))
|
||||
{
|
||||
i = -1;
|
||||
break;
|
||||
}
|
||||
if (i != -1)
|
||||
{
|
||||
vf_settings = realloc(vf_settings, (i + 2) * sizeof(m_obj_settings_t));
|
||||
vf_settings[i].name = strdup(str);
|
||||
vf_settings[i].attribs = NULL;
|
||||
vf_settings[i + 1].name = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
vf_settings = malloc(2 * sizeof(m_obj_settings_t));
|
||||
vf_settings[0].name = strdup(str);
|
||||
vf_settings[0].attribs = NULL;
|
||||
vf_settings[1].name = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
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 (!strcmp(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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* this function gets called by mplayer to update the gui */
|
||||
int guiGetEvent(int type, char *arg)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user