Incorporated review comments and merged on TOT

Change-Id: Ia147aeb73a6d8cf9c48e02ccaa428aa7adc04d3a
diff --git a/libvideoeditor/osal/src/M4OSA_FileCommon.c b/libvideoeditor/osal/src/M4OSA_FileCommon.c
index b7a0a5b..52fe781 100755
--- a/libvideoeditor/osal/src/M4OSA_FileCommon.c
+++ b/libvideoeditor/osal/src/M4OSA_FileCommon.c
@@ -45,7 +45,7 @@
 #include "M4OSA_Memory.h"
 #include "M4OSA_CharStar.h"
 
-#define FILE_LOWER_CASE //defined to support limitaion of lower case file system in sdcard.
+//#define FILE_LOWER_CASE //defined to support limitaion of lower case file system in sdcard.
 /**
  ************************************************************************
  * @brief      This function opens the provided URL and returns its context.
@@ -188,9 +188,13 @@
     pFileHandler = fopen((const char *)tempConversionBuf, (const char *)mode);
     /*Free the temporary decoded buffer*/
     M4OSA_free((M4OSA_MemAddr32)tempConversionBuf);
-#else if FILE_LOWER_CASE
+#else /* UTF_CONVERSION */
+#ifdef FILE_LOWER_CASE
     pFileHandler = fopen((const char *)tmpLowerCaseUrl, (const char *)mode);
     M4OSA_free((M4OSA_MemAddr32)tmpLowerCaseUrl);
+#else
+    pFileHandler = fopen((const char *)pUrl, (const char *)mode);
+#endif
 #endif /* UTF_CONVERSION */
 
     if (M4OSA_NULL == pFileHandler)
diff --git a/libvideoeditor/vss/inc/M4xVSS_Internal.h b/libvideoeditor/vss/inc/M4xVSS_Internal.h
index c0490e6..9bed7b7 100755
--- a/libvideoeditor/vss/inc/M4xVSS_Internal.h
+++ b/libvideoeditor/vss/inc/M4xVSS_Internal.h
@@ -51,6 +51,9 @@
 allocate at the initialization*/
 #define UTF_CONVERSION_BUFFER_SIZE            2048
 
+/* Max path length size */
+#define  M4XVSS_MAX_PATH_LEN 256
+
 /** Determine absolute value of a. */
 #define M4xVSS_ABS(a)               ( ( (a) < (0) ) ? (-(a)) : (a) )
 
diff --git a/libvideoeditor/vss/src/M4xVSS_API.c b/libvideoeditor/vss/src/M4xVSS_API.c
index 01e569d..67d168d 100755
--- a/libvideoeditor/vss/src/M4xVSS_API.c
+++ b/libvideoeditor/vss/src/M4xVSS_API.c
@@ -2145,8 +2145,8 @@
         if( xVSS_context->pSettings->pClipList[i]->FileType
             == M4VIDEOEDITING_kFileType_ARGB8888 )
         {
-            M4OSA_Char out_img[64];
-            M4OSA_Char out_img_tmp[64];
+            M4OSA_Char out_img[M4XVSS_MAX_PATH_LEN];
+            M4OSA_Char out_img_tmp[M4XVSS_MAX_PATH_LEN];
             M4xVSS_Pto3GPP_params *pParams = M4OSA_NULL;
             M4OSA_Context pARGBFileIn;
             /*UTF conversion support*/
@@ -2188,7 +2188,7 @@
             }
 
             /* Construct output temporary 3GP filename */
-            err = M4OSA_chrSPrintf(out_img, 63, (M4OSA_Char *)"%simg%d.3gp",
+            err = M4OSA_chrSPrintf(out_img, M4XVSS_MAX_PATH_LEN - 1, (M4OSA_Char *)"%simg%d.3gp",
                 xVSS_context->pTempPath, xVSS_context->tempFileIndex);
 
             if( err != M4NO_ERROR )
@@ -2203,7 +2203,7 @@
 
 #ifdef M4xVSS_RESERVED_MOOV_DISK_SPACE
 
-            err = M4OSA_chrSPrintf(out_img_tmp, 63, "%simg%d.tmp",
+            err = M4OSA_chrSPrintf(out_img_tmp, M4XVSS_MAX_PATH_LEN - 1, "%simg%d.tmp",
                 xVSS_context->pTempPath, xVSS_context->tempFileIndex);
 
             if( err != M4NO_ERROR )
@@ -2964,11 +2964,11 @@
 
                 )
             {
-                M4OSA_Char out_3gp[64];
-                M4OSA_Char out_3gp_tmp[64];
+                M4OSA_Char out_3gp[M4XVSS_MAX_PATH_LEN];
+                M4OSA_Char out_3gp_tmp[M4XVSS_MAX_PATH_LEN];
 
                 /* Construct output temporary 3GP filename */
-                err = M4OSA_chrSPrintf(out_3gp, 63, (M4OSA_Char *)"%svid%d.3gp",
+                err = M4OSA_chrSPrintf(out_3gp, M4XVSS_MAX_PATH_LEN - 1, (M4OSA_Char *)"%svid%d.3gp",
                     xVSS_context->pTempPath, xVSS_context->tempFileIndex);
 
                 if( err != M4NO_ERROR )
@@ -2979,7 +2979,7 @@
 
 #ifdef M4xVSS_RESERVED_MOOV_DISK_SPACE
 
-                err = M4OSA_chrSPrintf(out_3gp_tmp, 63, "%svid%d.tmp",
+                err = M4OSA_chrSPrintf(out_3gp_tmp, M4XVSS_MAX_PATH_LEN - 1, "%svid%d.tmp",
                     xVSS_context->pTempPath, xVSS_context->tempFileIndex);
 
                 if( err != M4NO_ERROR )
@@ -5706,8 +5706,8 @@
     if( xVSS_context->pSettings->xVSS.pBGMtrack != M4OSA_NULL )
     {
 
-        M4OSA_Char out_3gp[64];
-        M4OSA_Char out_3gp_tmp[64];
+        M4OSA_Char out_3gp[M4XVSS_MAX_PATH_LEN];
+        M4OSA_Char out_3gp_tmp[M4XVSS_MAX_PATH_LEN];
 
         /**/
         pEditSavingSettings->xVSS.pBGMtrack =
@@ -5808,8 +5808,8 @@
 
         /**/
 
-        M4OSA_chrNCopy(out_3gp, xVSS_context->pTempPath, 64);
-        M4OSA_chrNCopy(out_3gp_tmp, xVSS_context->pTempPath, 64);
+        M4OSA_chrNCopy(out_3gp, xVSS_context->pTempPath, M4XVSS_MAX_PATH_LEN - 1);
+        M4OSA_chrNCopy(out_3gp_tmp, xVSS_context->pTempPath, M4XVSS_MAX_PATH_LEN - 1);
 
         /* Construct output temporary 3GP filename */
         M4OSA_chrNCat(out_3gp, (M4OSA_Char *)"savetemp.3gp\0", 13);
diff --git a/libvideoeditor/vss/src/M4xVSS_internal.c b/libvideoeditor/vss/src/M4xVSS_internal.c
index a47bde8..f5f30ce 100755
--- a/libvideoeditor/vss/src/M4xVSS_internal.c
+++ b/libvideoeditor/vss/src/M4xVSS_internal.c
@@ -1581,7 +1581,7 @@
      M4xVSS_PictureCallbackCtxt*    pCallBackCtxt;
     M4OSA_Bool cmpResult=M4OSA_FALSE;
     M4OSA_Context pDummyAMRFile;
-    M4OSA_Char out_amr[64];
+    M4OSA_Char out_amr[M4XVSS_MAX_PATH_LEN];
     /*UTF conversion support*/
     M4OSA_Char* pDecodedPath = M4OSA_NULL;
     M4OSA_UInt32 i;
@@ -1592,7 +1592,7 @@
          xVSS_context->pFileWritePtr);
     if (err != M4NO_ERROR)
     {
-        M4OSA_TRACE1_1("M4PTO3GPP_Init returned %ld\n",err);
+        M4OSA_TRACE1_1("M4xVSS_internalStartConvertPictureTo3gp returned %ld\n",err);
         return err;
     }
 
@@ -1627,7 +1627,7 @@
 
     /**
      * Generate "dummy" amr file containing silence in temporary folder */
-    M4OSA_chrNCopy(out_amr, xVSS_context->pTempPath, 64);
+    M4OSA_chrNCopy(out_amr, xVSS_context->pTempPath, M4XVSS_MAX_PATH_LEN - 1);
     M4OSA_chrNCat(out_amr, (M4OSA_Char *)"dummy.amr\0", 10);
 
     /**
@@ -1769,7 +1769,7 @@
 {
     M4xVSS_Context* xVSS_context = (M4xVSS_Context*)pContext;
     M4OSA_ERR err;
-    M4OSA_Char out_amr[64];
+    M4OSA_Char out_amr[M4XVSS_MAX_PATH_LEN];
     /*UTF conversion support*/
     M4OSA_Char* pDecodedPath = M4OSA_NULL;
 
@@ -1802,7 +1802,7 @@
 
     /**
      * Remove dummy.amr file */
-    M4OSA_chrNCopy(out_amr, xVSS_context->pTempPath, 64);
+    M4OSA_chrNCopy(out_amr, xVSS_context->pTempPath, M4XVSS_MAX_PATH_LEN - 1);
     M4OSA_chrNCat(out_amr, (M4OSA_Char *)"dummy.amr\0", 10);
 
     /**