fix the bug for checking states
authorEonseokLee <eonseok.lee@samsung.com>
Sun, 31 Mar 2013 11:55:40 +0000 (20:55 +0900)
committerEonseokLee <eonseok.lee@samsung.com>
Sun, 31 Mar 2013 11:55:40 +0000 (20:55 +0900)
Change-Id: If2fc9bd8d4b4572f88f1a6525bf3e2ab7dd9f151
Signed-off-by: EonseokLee <eonseok.lee@samsung.com>
src/FMedia_PlayerImpl.cpp

index 89604e2..c1ba6a0 100644 (file)
@@ -1549,15 +1549,20 @@ _PlayerImpl::PlayerErrorCallBack(int errorCode, void *pUserData)
 {
        SysTryReturn(NID_MEDIA, pUserData, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. pUserData is null.");
        _PlayerImpl *pPlayerImpl = (_PlayerImpl *)pUserData;
-       if ((((errorCode == ::PLAYER_ERROR_DRM_EXPIRED) ||
+       if (
+                       ((errorCode == ::PLAYER_ERROR_DRM_EXPIRED) ||
                        (errorCode == ::PLAYER_ERROR_DRM_NO_LICENSE) ||
                        (errorCode == ::PLAYER_ERROR_DRM_FUTURE_USE) ||
                        (errorCode == ::PLAYER_ERROR_NOT_SUPPORTED_FILE) ||
                        (errorCode == ::PLAYER_ERROR_INVALID_URI) ||
                        (errorCode == ::PLAYER_ERROR_NO_SUCH_FILE) ||
                        (errorCode == ::PLAYER_ERROR_CONNECTION_FAILED) ||
-                       (errorCode == ::PLAYER_ERROR_DRM_NOT_PERMITTED)) &&
-                       (pPlayerImpl->__isAsync == true)) && ((pPlayerImpl->__currentState == PLAYER_STATE_INITIALIZED) || pPlayerImpl->__currentState == PLAYER_STATE_CLOSED))
+                       (errorCode == ::PLAYER_ERROR_DRM_NOT_PERMITTED))
+                       &&
+                       (pPlayerImpl->__isAsync == true)
+                       &&
+                       (pPlayerImpl->__currentState == PLAYER_STATE_OPENING)
+                       )
        {
                pPlayerImpl->HandlePlayerPrepared(errorCode);
        }