diff options
author | harklu <harklu@wat> | 2011-08-08 10:07:17 +0200 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-08-09 03:28:58 +0300 |
commit | d4b8d1486a69ee5bbd96a2758f56c1bbc6242bfb (patch) | |
tree | 943c14a454c9961f7bf7f9fbcdc1ac3da32e4917 /command.c | |
parent | fada084499a33a4a1d7ef79f3ac72364a55e0c17 (diff) | |
download | mpv-d4b8d1486a69ee5bbd96a2758f56c1bbc6242bfb.tar.bz2 mpv-d4b8d1486a69ee5bbd96a2758f56c1bbc6242bfb.tar.xz |
core: allocate OSD text buffers dynamically
The OSD text buffers (mp_osd_msg_t.text and osd_state.text) used to be
static arrays, with the buffer sizes spread all over the code as magic
constants. Make the buffers dynamically allocated and remove the
arbitrary length limits.
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2981,7 +2981,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) set_osd_msg(OSD_MSG_TEXT, cmd->args[2].v.i, (cmd->args[1].v.i < 0 ? osd_duration : cmd->args[1].v.i), - "%-.63s", cmd->args[0].v.s); + "%s", cmd->args[0].v.s); break; case MP_CMD_OSD_SHOW_PROPERTY_TEXT: { @@ -2993,7 +2993,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) set_osd_msg(OSD_MSG_TEXT, cmd->args[2].v.i, (cmd->args[1].v.i < 0 ? osd_duration : cmd->args[1].v.i), - "%-.63s", txt); + "%s", txt); free(txt); } break; |