Fixed crash bug by releasing media player resources.