From 0e7d7464b0f87ce82fa5c48e350a2d51fcef4882 Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 25 May 2005 13:11:42 +0000 Subject: Made unfreeze close connection, when no recording is done. --- src/decoder.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/decoder.cc') 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; -- cgit v1.2.3