Merge branch 'master' into tizen_2.0
authorSangchul Lee <sc11.lee@samsung.com>
Tue, 15 Jan 2013 13:03:12 +0000 (22:03 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Tue, 15 Jan 2013 13:03:12 +0000 (22:03 +0900)
src/mm_player_priv.c
src/mm_player_utils.c

index 1e4c1ea..59c6bed 100755 (executable)
@@ -9088,12 +9088,9 @@ __mmplayer_handle_gst_error ( mm_player_t* player, GstMessage * message, GError*
        /* post error to application */
        if ( ! player->posted_msg )
        {
-               if (msg_param.code == MM_MESSAGE_DRM_NOT_AUTHORIZED ||
-                       msg_param.code == MM_MESSAGE_DRM_NO_LICENSE ||
-                       msg_param.code == MM_MESSAGE_DRM_FUTURE_USE ||
-                       msg_param.code == MM_MESSAGE_DRM_EXPIRED )
+               if (msg_param.code == MM_MESSAGE_DRM_NOT_AUTHORIZED )
                {
-                       MMPLAYER_POST_MSG( player, msg_param.code, NULL );
+                       MMPLAYER_POST_MSG( player, MM_MESSAGE_DRM_NOT_AUTHORIZED, NULL );
                }
                else
                {
@@ -9587,20 +9584,6 @@ __gst_transform_gsterror( mm_player_t* player, GstMessage * message, GError* err
                case GST_STREAM_ERROR_DECRYPT_NOKEY:
                {
                        debug_error("decryption error, [%s] failed, reason : [%s]\n", src_element_name, error->message);
-
-                       if ( strstr(error->message, "rights expired") )
-                       {
-                               return MM_MESSAGE_DRM_EXPIRED;
-                       }
-                       else if ( strstr(error->message, "no rights") )
-                       {
-                               return MM_MESSAGE_DRM_NO_LICENSE;
-                       }
-                       else if ( strstr(error->message, "has future rights") )
-                       {
-                               return MM_MESSAGE_DRM_FUTURE_USE;
-                       }
-
                        return MM_MESSAGE_DRM_NOT_AUTHORIZED;
                }
                break;
index fd2c18e..261d7d4 100755 (executable)
@@ -81,7 +81,10 @@ bool util_remove_file_backup(const char *backup_path)
 
        int res = access(backup_path, R_OK);
        if (!res)
-               remove(backup_path);
+       {
+               if (remove(backup_path) == -1)
+                       return FALSE;
+       }
 
        return TRUE;
 }