]> git.vomp.tv Git - vompserver.git/commitdiff
Bug fix with moving a recording with special characters in the name
authorChris Tallon <chris@vomp.tv>
Mon, 12 Mar 2018 13:36:13 +0000 (13:36 +0000)
committerChris Tallon <chris@vomp.tv>
Mon, 12 Mar 2018 13:36:13 +0000 (13:36 +0000)
recplayer.c
vompclientrrproc.c

index ce01e2600bea33bd36435b1774f80312a4e5b45c..02bd6f2fde2670b47165b9f4fbdbea6dba4dc7fd 100644 (file)
@@ -75,7 +75,7 @@ void RecPlayer::scan()
 
     segments[i] = new Segment();
     segments[i]->start = totalLength;
-    fseek(file, 0, SEEK_END);
+    fseeko(file, 0, SEEK_END);
     totalLength += ftello(file);
     totalFrames = indexFile->Last();
     log->log("RecPlayer", Log::DEBUG, "File %i found, totalLength now %llu, numFrames = %lu", i, totalLength, totalFrames);
index 6799c77ac49ab4857d0ac60917cd8db63bc3a811..4e123be85cb3b4b30c3d199b7691dc98fbd51e39 100644 (file)
@@ -912,9 +912,9 @@ int VompClientRRProc::processMoveRecording()
       log->log("RRProc", Log::DEBUG, "viddir: %s", VideoDirectory);
 #endif
 
-      char* newPathConv = new char[strlen(newPath)+1];
+      char* newPathConv = (char*)malloc(strlen(newPath)+1);
       strcpy(newPathConv, newPath);
-      ExchangeChars(newPathConv, true);
+      newPathConv = ExchangeChars(newPathConv, true);
       log->log("RRProc", Log::DEBUG, "EC: %s", newPathConv);
 
 #if APIVERSNUM > 20101
@@ -926,7 +926,7 @@ int VompClientRRProc::processMoveRecording()
       log->log("RRProc", Log::DEBUG, "l10: %i", strlen(VideoDirectory) + strlen(newPathConv) + strlen(titleDirName) + 1);
       sprintf(newContainer, "%s%s%s", VideoDirectory, newPathConv, titleDirName);
 #endif
-      delete[] newPathConv;
+      free(newPathConv);
 
       log->log("RRProc", Log::DEBUG, "%s", newContainer);