Fixed DateTimeName for .flv output
Also works with directory names containing dots (see <http://obsproject.com/forum/viewtopic.php?f=6&t=8967>)
This commit is contained in:
parent
826f260951
commit
0d87d3977b
@ -445,7 +445,6 @@ retryHookTestV2:
|
|||||||
OSFindData ofd;
|
OSFindData ofd;
|
||||||
HANDLE hFind = NULL;
|
HANDLE hFind = NULL;
|
||||||
bool bUseDateTimeName = true;
|
bool bUseDateTimeName = true;
|
||||||
bool bIsDirectory = true;
|
|
||||||
bool bOverwrite = GlobalConfig->GetInt(L"General", L"OverwriteRecordings", false) != 0;
|
bool bOverwrite = GlobalConfig->GetInt(L"General", L"OverwriteRecordings", false) != 0;
|
||||||
|
|
||||||
if(!bOverwrite && (hFind = OSFindFirstFile(strOutputFile, ofd)))
|
if(!bOverwrite && (hFind = OSFindFirstFile(strOutputFile, ofd)))
|
||||||
@ -466,7 +465,6 @@ retryHookTestV2:
|
|||||||
strOutputFile = strNewFilePath;
|
strOutputFile = strNewFilePath;
|
||||||
|
|
||||||
bUseDateTimeName = false;
|
bUseDateTimeName = false;
|
||||||
bIsDirectory = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ofd.bDirectory)
|
if(ofd.bDirectory)
|
||||||
@ -485,10 +483,11 @@ retryHookTestV2:
|
|||||||
GetLocalTime(&st);
|
GetLocalTime(&st);
|
||||||
|
|
||||||
String strDirectory = GetPathDirectory(strOutputFile);
|
String strDirectory = GetPathDirectory(strOutputFile);
|
||||||
|
String file = strOutputFile.Right(strOutputFile.Length() - strDirectory.Length());
|
||||||
String extension;
|
String extension;
|
||||||
|
|
||||||
if(!bIsDirectory)
|
if (!file.IsEmpty())
|
||||||
extension = GetPathExtension(strOutputFile);
|
extension = GetPathExtension(file.Array());
|
||||||
|
|
||||||
if(extension.IsEmpty())
|
if(extension.IsEmpty())
|
||||||
extension = TEXT("mp4");
|
extension = TEXT("mp4");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user