Associate the return input stream to the encoder.

Encoder only gets released when input stream is released and then the file can get deleted.