fixed a bug that cannot encode video on Linux