1. Removed g_main_loop. 2. Removed unnecessary pthread mutex. 3. Gstreamer video releasing improved.