summaryrefslogtreecommitdiff
path: root/src/encoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoder.cc')
-rw-r--r--src/encoder.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/encoder.cc b/src/encoder.cc
index f0b3324..f16a754 100644
--- a/src/encoder.cc
+++ b/src/encoder.cc
@@ -39,6 +39,10 @@
/*
* $Log$
+ * Revision 1.28 2005/05/25 13:11:42 deva
+ *
+ * Made unfreeze close connection, when no recording is done.
+ *
* Revision 1.27 2005/05/22 16:34:44 deva
*
* Fix: Connection is now taken down when taking a sanpshot without recording.
@@ -118,6 +122,13 @@ Encoder::Encoder(Info *ginfo,
Encoder::~Encoder()
{
+ // If a hanging connection exists, we better close it.
+ if(s) {
+ if(n) delete n;
+ delete s;
+ s = NULL;
+ n = NULL;
+ }
}
@@ -131,11 +142,12 @@ void Encoder::encode()
frame = queue->pop();
if(frame) {
- if(frame->freeze) frozen = true;
+ if(frame->freeze == 1) frozen = true;
+ if(frame->freeze == -1) frozen = false;
if(frame->shoot) frozen = false;
if(frame->record ||
- frame->freeze ||
+ (frame->freeze == 1) ||
frame->shoot) {
// If no connection is present, make a new one