fix cmd stream corruption when cmd stream playing
This commit is contained in:
parent
a2c745cb10
commit
b946f08122
2 changed files with 7 additions and 0 deletions
|
|
@ -644,6 +644,12 @@ bool DivCSPlayer::init() {
|
|||
|
||||
bool DivEngine::playStream(unsigned char* f, size_t length) {
|
||||
BUSY_BEGIN;
|
||||
// kill the previous player
|
||||
if (cmdStreamInt) {
|
||||
cmdStreamInt->cleanup();
|
||||
delete cmdStreamInt;
|
||||
cmdStreamInt=NULL;
|
||||
}
|
||||
cmdStreamInt=new DivCSPlayer(this,f,length);
|
||||
if (!cmdStreamInt->init()) {
|
||||
logE("not a command stream!");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue