[MPlayer-cvslog] r24987 - trunk/input/input.c
    ulion 
    subversion at mplayerhq.hu
       
    Thu Nov  8 06:19:56 CET 2007
    
    
  
Author: ulion
Date: Thu Nov  8 06:19:56 2007
New Revision: 24987
Log:
Fix cmd filter memory leak, free the cmd after filter ate it.
Modified:
   trunk/input/input.c
Modified: trunk/input/input.c
==============================================================================
--- trunk/input/input.c	(original)
+++ trunk/input/input.c	Thu Nov  8 06:19:56 2007
@@ -1294,8 +1294,13 @@ mp_input_get_cmd(int time, int paused, i
   if(!ret) return NULL;
 
   for(cf = cmd_filters ; cf ; cf = cf->next) {
-    if(cf->filter(ret,paused,cf->ctx))
+    if(cf->filter(ret,paused,cf->ctx)) {
+      if (peek_only && from_queue)
+        // The filter ate the cmd, so we remove it from queue
+        ret = mp_input_get_queued_cmd(0);
+      mp_cmd_free(ret);
       return NULL;
+    }
   }
 
   if (!from_queue && peek_only)
    
    
More information about the MPlayer-cvslog
mailing list