gstreamer application hangs with setting pipeline to NULL, this is recommended before terminating the application.