diff options
Diffstat (limited to 'src/decoder.cc')
-rw-r--r-- | src/decoder.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/decoder.cc b/src/decoder.cc index e908b63..db95fe8 100644 --- a/src/decoder.cc +++ b/src/decoder.cc @@ -39,6 +39,10 @@ /* * $Log$ + * Revision 1.29 2005/05/25 13:11:42 deva + * + * Made unfreeze close connection, when no recording is done. + * * Revision 1.28 2005/05/16 16:00:56 deva * * Lots of stuff! @@ -123,7 +127,7 @@ Decoder::~Decoder() void Decoder::decode() { bool local_shoot; - bool local_freeze; + int local_freeze; bool local_record = false; bool old_record; @@ -151,7 +155,7 @@ void Decoder::decode() pthread_mutex_unlock(&shot_mutex); } - if(local_freeze) { + if(local_freeze == 1) { pthread_mutex_lock(&shot_mutex); if(shot) delete shot; shot = new Frame(ptr, DVPACKAGE_SIZE); @@ -204,7 +208,7 @@ void Decoder::run() { */ void Decoder::freeze() { - b_freeze = true; + b_freeze = 1; } /* @@ -212,6 +216,8 @@ void Decoder::freeze() */ void Decoder::unfreeze() { + b_freeze = -1; + pthread_mutex_lock(&shot_mutex); delete shot; shot = NULL; |