diff options
author | deva <deva> | 2006-04-12 13:41:45 +0000 |
---|---|---|
committer | deva <deva> | 2006-04-12 13:41:45 +0000 |
commit | 6da7cc9bd16bb16f03bf0695b79cb41f9f23f58f (patch) | |
tree | a8f94dd7ff7e10a308d0ce0787a8070a621c4fa6 /client/decoder.cc | |
parent | c9a7d3ecf5a5e979c4503dbf1f072898ffd72574 (diff) |
*** empty log message ***
Diffstat (limited to 'client/decoder.cc')
-rw-r--r-- | client/decoder.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/client/decoder.cc b/client/decoder.cc index 5c2cce5..ea67d68 100644 --- a/client/decoder.cc +++ b/client/decoder.cc @@ -40,6 +40,8 @@ #include <QEvent> #include <QApplication> +#include "control.h" + Decoder::Decoder(): semaphore(1) { frame = NULL; @@ -63,10 +65,15 @@ void Decoder::run() while(running) { char *tmp = (char*)reader.readFrame(); - mutex.lock(); - if(frame) free(frame); - frame = tmp; - mutex.unlock(); + + if(MIaV::control.isFrozen() == false) { + mutex.lock(); + if(frame) free(frame); + frame = tmp; + mutex.unlock(); + } else { + free(tmp); + } } semaphore.release(); // Unlock the shutdown process } |