[MPlayer-cvslog] r37839 - trunk/gui/win32/interface.c
ib
subversion at mplayerhq.hu
Sun Mar 6 19:10:55 CET 2016
Author: ib
Date: Sun Mar 6 19:10:55 2016
New Revision: 37839
Log:
Supplement to r37835.
input.c: optimize mp_cmd list.
Reduce its size and encode strings directly
to avoid relocations.
Modified:
trunk/gui/win32/interface.c
Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c Sun Mar 6 14:18:37 2016 (r37838)
+++ trunk/gui/win32/interface.c Sun Mar 6 19:10:55 2016 (r37839)
@@ -348,7 +348,7 @@ static void guiSetEvent(int event)
{
mp_cmd_t * cmd = calloc(1, sizeof(*cmd));
cmd->id=MP_CMD_MUTE;
- cmd->name=strdup("mute");
+ ARRAY_STRCPY(cmd->name, "mute");
mp_input_queue_cmd(cmd);
break;
}
@@ -405,7 +405,7 @@ void uiPause( void )
{
mp_cmd_t * cmd = calloc(1, sizeof(*cmd));
cmd->id=MP_CMD_PAUSE;
- cmd->name=strdup("pause");
+ ARRAY_STRCPY(cmd->name, "pause");
mp_input_queue_cmd(cmd);
} else guiInfo.Playing = GUI_PLAY;
}
More information about the MPlayer-cvslog
mailing list