summaryrefslogtreecommitdiff
path: root/src/decoder.cc
diff options
context:
space:
mode:
authordeva <deva>2005-05-25 13:11:42 +0000
committerdeva <deva>2005-05-25 13:11:42 +0000
commit0e7d7464b0f87ce82fa5c48e350a2d51fcef4882 (patch)
treedb63bd5b36bc437b84485ad463d45bfb5c2f0bcb /src/decoder.cc
parent30741368102da5e5a8e4f8b897f2502edfa0165b (diff)
Made unfreeze close connection, when no recording is done.
Diffstat (limited to 'src/decoder.cc')
-rw-r--r--src/decoder.cc12
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;