Moved getStreamFromStream to common.c, to allow other threads to use.