From 3f7db06e3cff366d07f604fee6e9ed590805e9dd Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sun, 3 Jun 2012 15:25:41 +0200 Subject: [PATCH] Pause between polling the mkvmerge process Otherwise polling all the time uses excessive amounts of CPU power. Fixes #762. --- ChangeLog | 4 ++++ src/mmg/mux_dialog.cpp | 3 +++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2e816beba..531ea4f25 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-06-03 Moritz Bunkus + + * mmg: bug fix: Fixed mmg's excessive CPU usage during muxing. + 2012-06-01 Moritz Bunkus * mkvmerge: bug fix: Reading DTS from AVI files often resulted in diff --git a/src/mmg/mux_dialog.cpp b/src/mmg/mux_dialog.cpp index 866d7adaa..cc253bd74 100644 --- a/src/mmg/mux_dialog.cpp +++ b/src/mmg/mux_dialog.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include "common/at_scope_exit.h" #include "common/fs_sys_helpers.h" @@ -378,6 +379,8 @@ mux_thread::Entry() { if (TestDestroy()) return nullptr; char_read = read_input(c, eof); + if (!char_read && !eof) + wxMilliSleep(100); } if ((c == '\n') || (c == '\r') || eof) {