A method for preventing a descrambling library from deadlocking, wherein, the method is applied to a terminal comprising the descrambling library, a smart card driving module, a smart card and a virtual smart card module, and the method comprising: during a process of playing mobile multimedia, the descrambling library sending request information for obtaining a program key to the smart card driving module, and after the smart card driving module receiving the request information for obtaining the program key, the smart card driving module judging that the smart card is in a plug-in state, the smart card driving module forwarding the request information to the smart card, receiving response information returned by the smart card, forwarding the response information to the descrambling library, and meanwhile forwarding the response information to the virtual smart card module to save; then the smart card driving module judging that the smart card is in a pull-out state, the smart card driving module forwarding the request information to the virtual smart card module, the virtual smart card module returning the saved response information to the smart card driving module, and the smart card driving module forwarding the response information to the descrambling library; wherein, the smart card driving module detects and records a plug state of the smart card in real time; when the smart card is plugged in, the smart card driving module initializes the smart card, after the smart card reaches an available state, the state of the smart card is modified to be plug-in state; when the smart card is pulled out, the state of the smart card is modified to be pull-out state; thereby preventing the descrambling library in the terminal from deadlocking when the mobile multimedia is played; wherein the method further comprises: after the virtual smart card module receives the response information forwarded by the smart card driving module, if the virtual smart card module has not saved any response information, saving the response information, and if response information has already been saved in local, updating the originally saved response information. during a process of playing mobile multimedia, the descrambling library sending request information for obtaining a program key to the smart card driving module, and after the smart card driving module receiving the request information for obtaining the program key, the smart card driving module judging that the smart card is in a plug-in state, the smart card driving module forwarding the request information to the smart card, receiving response information returned by the smart card, forwarding the response information to the descrambling library, and meanwhile forwarding the response information to the virtual smart card module to save; then the smart card driving module judging that the smart card is in a pull-out state, the smart card driving module forwarding the request information to the virtual smart card module, the virtual smart card module returning the saved response information to the smart card driving module, and the smart card driving module forwarding the response information to the descrambling library; wherein, the smart card driving module detects and records a plug state of the smart card in real time; when the smart card is plugged in, the smart card driving module initializes the smart card, after the smart card reaches an available state, the state of the smart card is modified to be plug-in state; when the smart card is pulled out, the state of the smart card is modified to be pull-out state; thereby preventing the descrambling library in the terminal from deadlocking when the mobile multimedia is played; wherein the method further comprises: after the virtual smart card module receives the response information forwarded by the smart card driving module, if the virtual smart card module has not saved any response information, saving the response information, and if response information has already been saved in local, updating the originally saved response information.