[MPlayer-cvslog] r35421 - trunk/input/input.c

reimar subversion at mplayerhq.hu
Thu Nov 15 19:44:20 CET 2012


Author: reimar
Date: Thu Nov 15 19:44:19 2012
New Revision: 35421

Log:
Revert r35388.

The code is a bit confusing, but peeked commands
should never be freed.

Modified:
   trunk/input/input.c

Modified: trunk/input/input.c
==============================================================================
--- trunk/input/input.c	Sun Nov 11 00:52:19 2012	(r35420)
+++ trunk/input/input.c	Thu Nov 15 19:44:19 2012	(r35421)
@@ -1907,6 +1907,7 @@ static int mp_input_print_cmd_list(m_opt
 int
 mp_input_check_interrupt(int time) {
   mp_cmd_t *cmd = mp_input_get_cmd(time,0,1);
+  // Note: we must not free this, since we only peeked
   if (!cmd)
     return 0;
   switch(cmd->id) {
@@ -1914,11 +1915,9 @@ mp_input_check_interrupt(int time) {
   case MP_CMD_PLAY_TREE_STEP:
   case MP_CMD_PLAY_TREE_UP_STEP:
   case MP_CMD_PLAY_ALT_SRC_STEP:
-    mp_cmd_free(cmd);
     // The cmd will be executed when we are back in the main loop
     return 1;
   }
-  mp_cmd_free(cmd);
   // remove the cmd from the queue
   cmd = mp_input_get_cmd(time,0,0);
   mp_cmd_free(cmd);


More information about the MPlayer-cvslog mailing list