Skip to content

Commit

Permalink
fix for "Export .qctools.mkv Not Saving #738"
Browse files Browse the repository at this point in the history
  • Loading branch information
ElderOrb committed Sep 7, 2023
1 parent f21108c commit e1747a2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Source/Core/CommonStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ CommonStats::~CommonStats()

void CommonStats::processAdditionalStats(const char* key, const char* value, bool statsMapInitialized)
{
if (strcmp(key, "qctools.comment") == 0)
return;

if(!statsMapInitialized) {
auto type = StatsValueInfo::typeFromKey(key, value);
auto stats = StatsValueInfo {
Expand Down Expand Up @@ -459,7 +462,7 @@ std::string CommonStats::Percent_Get(size_t Pos)
return str.str();
}

void CommonStats::statsFromExternalData(const char *Data, size_t Size, const std::function<CommonStats*(int, size_t)>& statsGetter)
void CommonStats::statsFromExternalData(const char *Data, size_t Size, const std::function<CommonStats*(int, int)>& statsGetter)
{
// AudioStats from external data
// XML input
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/CommonStats.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class CommonStats
std::string Count2_Get(size_t Pos);
std::string Percent_Get(size_t Pos);

static void statsFromExternalData(const char* Data, size_t Size, const std::function<CommonStats*(int, size_t)>& statsGetter);
static void statsFromExternalData(const char* Data, size_t Size, const std::function<CommonStats*(int, int)>& statsGetter);

virtual void parseFrame(tinyxml2::XMLElement* frame) = 0;

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/FileInformation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ void FileInformation::readStats(QIODevice& StatsFromExternalData_File, bool Stat
Xml_Size+=Xml_HeaderSize+Xml_FooterSize;
Xml_SizeForParsing+=Xml_FooterSize;

CommonStats::statsFromExternalData(Xml, Xml_SizeForParsing, [&](int type, size_t index) -> CommonStats* {
CommonStats::statsFromExternalData(Xml, Xml_SizeForParsing, [&](int type, int index) -> CommonStats* {
if(Stats.size() <= index)
Stats.resize(index + 1);

Expand Down

0 comments on commit e1747a2

Please sign in to comment.