Encoders/decoders should track the connection object
The connection object is a much more appropriate object for the
decoders and encoders to keep track of. Besides the streams, it also
contains state like connection parameters.
diff --git a/vncviewer/CConn.cxx b/vncviewer/CConn.cxx
index f542062..db1a08a 100644
--- a/vncviewer/CConn.cxx
+++ b/vncviewer/CConn.cxx
@@ -399,7 +399,7 @@
}
if (!decoders[encoding]) {
- decoders[encoding] = Decoder::createDecoder(encoding, reader());
+ decoders[encoding] = Decoder::createDecoder(encoding, this);
if (!decoders[encoding]) {
fprintf(stderr, "Unknown rect encoding %d\n", encoding);
throw Exception("Unknown rect encoding");