summaryrefslogtreecommitdiff
path: root/src/encoder.cc
diff options
context:
space:
mode:
authordeva <deva>2005-05-02 20:34:38 +0000
committerdeva <deva>2005-05-02 20:34:38 +0000
commit2e33fab9c99395d30da0859533f2ba27c8406908 (patch)
tree1d877a69c4eb091037f9697c9b6eae973c9ee932 /src/encoder.cc
parentda81b8d2762d8331f2f5efca39d3ea1720173ad3 (diff)
Some hacked borky ugly scumm code to check for errors! :(
Diffstat (limited to 'src/encoder.cc')
-rw-r--r--src/encoder.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/encoder.cc b/src/encoder.cc
index e6cbb92..0af6ad4 100644
--- a/src/encoder.cc
+++ b/src/encoder.cc
@@ -25,6 +25,10 @@
*/
/*
* $Log$
+ * Revision 1.25 2005/05/02 20:34:38 deva
+ *
+ * Some hacked borky ugly scumm code to check for errors! :(
+ *
* Revision 1.24 2005/05/02 10:35:23 deva
* Fixed wrongly showed snapshot thumbnails.
*
@@ -106,7 +110,8 @@ void Encoder::encode()
frame = queue->pop();
- if(frame) {
+ // If errors has occurred we better not try sending something over the network!
+ if(frame && !errobj->hasError()) {
if(frame->freeze) frozen = true;
if(frame->shoot) frozen = false;
@@ -119,6 +124,15 @@ void Encoder::encode()
s = new Socket(port, errobj);
s->sconnect(ip);
n = new Network(s, errobj);
+ // FIXME: This is darn ugly!
+ if(errobj->hasError()) {
+ delete n;
+ delete s;
+ s = NULL;
+ n = NULL;
+ // break;
+ goto getout;
+ }
}
n_header h;
@@ -147,6 +161,7 @@ void Encoder::encode()
}
}
}
+ getout:
if(frame) delete frame;
}
}