diff options
author | deva <deva> | 2005-05-25 13:11:42 +0000 |
---|---|---|
committer | deva <deva> | 2005-05-25 13:11:42 +0000 |
commit | 0e7d7464b0f87ce82fa5c48e350a2d51fcef4882 (patch) | |
tree | db63bd5b36bc437b84485ad463d45bfb5c2f0bcb /src/encoder.cc | |
parent | 30741368102da5e5a8e4f8b897f2502edfa0165b (diff) |
Made unfreeze close connection, when no recording is done.
Diffstat (limited to 'src/encoder.cc')
-rw-r--r-- | src/encoder.cc | 16 |
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 |