Skip to content

Commit

Permalink
Fix code blocks format
Browse files Browse the repository at this point in the history
  • Loading branch information
valnoel committed Jan 24, 2020
1 parent b899eab commit 06a8c9e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/avAudioPhaseMeter/avAudioPhaseMeter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ std::vector<avtranscoder::InputStreamDesc> parseConfigFile(const std::string& co
while(std::getline(configFile, line))
{
if(++countLines > 2)
{
throw std::runtime_error("Audio phase analysis can only be done on a stereo pair, i.e. two channels (see usage).");
}

std::istringstream is_line(line);
std::string filename;
Expand All @@ -36,7 +38,9 @@ std::vector<avtranscoder::InputStreamDesc> parseConfigFile(const std::string& co
ss >> streamIndex;
ss >> separator;
if(separator == '.')
{
ss >> channelIndex;
}

bool newInputDescAdded = false;
// if we already have an input description with the same filename/streamIndex, add only the new channelIndex
Expand All @@ -49,8 +53,10 @@ std::vector<avtranscoder::InputStreamDesc> parseConfigFile(const std::string& co
break;
}
}
if(! newInputDescAdded)
if(!newInputDescAdded)
{
result.push_back(avtranscoder::InputStreamDesc(filename, streamIndex, channelIndex));
}
}
}

Expand Down Expand Up @@ -83,7 +89,8 @@ int main(int argc, char** argv)
avtranscoder::preloadCodecsAndFormats();
avtranscoder::Logger::setLogLevel(AV_LOG_QUIET);

if(argc < 3) {
if(argc < 3)
{
displayUsage(argv[0]);
}

Expand Down

0 comments on commit 06a8c9e

Please sign in to comment.