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/encoder.cc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/encoder.cc') 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 -- cgit v1.2.3