Fixed freeze with ffmpeg.