fixed a bug that cannot perform encoding a video correctly