Decouple decoders from CConnection
diff --git a/common/rfb/DecodeManager.cxx b/common/rfb/DecodeManager.cxx
index f6ffa4b..b82d31d 100644
--- a/common/rfb/DecodeManager.cxx
+++ b/common/rfb/DecodeManager.cxx
@@ -19,6 +19,7 @@
 #include <assert.h>
 #include <string.h>
 
+#include <rfb/CConnection.h>
 #include <rfb/DecodeManager.h>
 #include <rfb/Decoder.h>
 
@@ -53,11 +54,11 @@
   }
 
   if (!decoders[encoding]) {
-    decoders[encoding] = Decoder::createDecoder(encoding, conn);
+    decoders[encoding] = Decoder::createDecoder(encoding);
     if (!decoders[encoding]) {
       vlog.error("Unknown encoding %d", encoding);
       throw rdr::Exception("Unknown encoding");
     }
   }
-  decoders[encoding]->readRect(r, pb);
+  decoders[encoding]->readRect(r, conn->getInStream(), conn->cp, pb);
 }