Mutex::Autolock autoLock(mLock);
if (mSuspensionState != NULL) {
- return INVALID_OPERATION;
+ if (mLastVideoBuffer == NULL) {
+ //go into here if video is suspended again
+ //after resuming without being played between
+ //them
+ SuspensionState *state = mSuspensionState;
+ mSuspensionState = NULL;
+ reset_l();
+ mSuspensionState = state;
+ return OK;
+ }
+
+ delete mSuspensionState;
+ mSuspensionState = NULL;
}
if (mFlags & PREPARING) {
play_l();
}
- delete state;
+ mSuspensionState = state;
state = NULL;
return OK;