1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-17 04:58:06 +00:00

Fix cmd filter memory leak, free the cmd after filter ate it.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24987 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
ulion 2007-11-08 05:19:56 +00:00
parent c90770493c
commit ac46121b3b

View File

@ -1294,8 +1294,13 @@ mp_input_get_cmd(int time, int paused, int peek_only) {
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)