AVIDump: Remove incorrect usage of s_ prefix

This commit is contained in:
JosJuice 2018-01-17 22:11:44 +01:00
parent e02025b45e
commit 2441fd28d5
1 changed files with 14 additions and 14 deletions

View File

@ -100,16 +100,16 @@ static std::string GetDumpPath(const std::string& format)
if (!g_Config.sDumpPath.empty()) if (!g_Config.sDumpPath.empty())
return g_Config.sDumpPath; return g_Config.sDumpPath;
std::string s_dump_path = File::GetUserPath(D_DUMPFRAMES_IDX) + "framedump" + const std::string dump_path = File::GetUserPath(D_DUMPFRAMES_IDX) + "framedump" +
std::to_string(s_file_index) + "." + format; std::to_string(s_file_index) + "." + format;
// Ask to delete file // Ask to delete file
if (File::Exists(s_dump_path)) if (File::Exists(dump_path))
{ {
if (SConfig::GetInstance().m_DumpFramesSilent || if (SConfig::GetInstance().m_DumpFramesSilent ||
AskYesNoT("Delete the existing file '%s'?", s_dump_path.c_str())) AskYesNoT("Delete the existing file '%s'?", dump_path.c_str()))
{ {
File::Delete(s_dump_path); File::Delete(dump_path);
} }
else else
{ {
@ -118,29 +118,29 @@ static std::string GetDumpPath(const std::string& format)
} }
} }
return s_dump_path; return dump_path;
} }
bool AVIDump::CreateVideoFile() bool AVIDump::CreateVideoFile()
{ {
const std::string& s_format = g_Config.sDumpFormat; const std::string& format = g_Config.sDumpFormat;
std::string s_dump_path = GetDumpPath(s_format); const std::string dump_path = GetDumpPath(format);
if (s_dump_path.empty()) if (dump_path.empty())
return false; return false;
File::CreateFullPath(s_dump_path); File::CreateFullPath(dump_path);
AVOutputFormat* output_format = av_guess_format(s_format.c_str(), s_dump_path.c_str(), nullptr); AVOutputFormat* output_format = av_guess_format(format.c_str(), dump_path.c_str(), nullptr);
if (!output_format) if (!output_format)
{ {
ERROR_LOG(VIDEO, "Invalid format %s", s_format.c_str()); ERROR_LOG(VIDEO, "Invalid format %s", format.c_str());
return false; return false;
} }
if (avformat_alloc_output_context2(&s_format_context, output_format, nullptr, if (avformat_alloc_output_context2(&s_format_context, output_format, nullptr, dump_path.c_str()) <
s_dump_path.c_str()) < 0) 0)
{ {
ERROR_LOG(VIDEO, "Could not allocate output context"); ERROR_LOG(VIDEO, "Could not allocate output context");
return false; return false;