External renderer exits
Currently, in case of running errors, the external renderer application exits via an exit(-1)
command and the memory resources are not deallocated.
A proper deallocation mechanism using goto cleanup;
should be introduced similarly as in the encoder or the decoder.