@@ -78,6 +78,8 @@ bool ConfigGenerator::passConfig(const int argc, char** argv)
7878 if (!passCurrentValues ()) {
7979 return false ;
8080 }
81+ // Super ensure forced values
82+ buildForcedValues ();
8183 return true ;
8284}
8385
@@ -1341,6 +1343,9 @@ bool ConfigGenerator::passFindThingsExtern(const string& param1, const string& p
13411343 // Skip any occurrence of 'const'
13421344 if ((findFile.at (start) == ' c' ) && (findFile.find (" const " , start) == start)) {
13431345 start += 6 ;
1346+ } else if ((findFile.at (start) == ' L' ) && (findFile.find (" LIBX264_CONST " , start) == start)) {
1347+ // Hacky fix for detecting a macro define of const
1348+ start += 14 ;
13441349 }
13451350 // Check for search tag
13461351 start = findFile.find_first_not_of (g_whiteSpace, start);
@@ -1387,6 +1392,7 @@ bool ConfigGenerator::passFindThingsExtern(const string& param1, const string& p
13871392bool ConfigGenerator::passFindFiltersExtern (const string& param1, vector<string>& returnList) const
13881393{
13891394 // s/^extern AVFilter ff_([avfsinkrc]{2,5})_([a-zA-Z0-9_]+);/\2_filter/p
1395+ // s/^extern const AVFilter ff_[avfsinkrc]\{2,5\}_\([[:alnum:]_]\{1,\}\);/\1_filter/p from 4.4 onwards
13901396 // Need to find and open the specified file
13911397 const string file = m_rootDirectory + param1;
13921398 string findFile;
@@ -1395,8 +1401,12 @@ bool ConfigGenerator::passFindFiltersExtern(const string& param1, vector<string>
13951401 }
13961402
13971403 // Find the search pattern in the file
1398- const string search = " extern AVFilter ff_" ;
1404+ string search = " extern AVFilter ff_" ;
13991405 uint start = findFile.find (search);
1406+ if (start == string::npos) {
1407+ search = " extern const AVFilter ff_" ;
1408+ start = findFile.find (search);
1409+ }
14001410 while (start != string::npos) {
14011411 // Find the start and end of the tag
14021412 start += search.length ();
@@ -1473,6 +1483,7 @@ bool ConfigGenerator::passFilterOut(
14731483bool ConfigGenerator::passFullFilterName (const string& param1, string& returnString) const
14741484{
14751485 // sed -n "s/^extern AVFilter ff_\([avfsinkrc]\{2,5\}\)_$1;/\1_$1/p"
1486+ // s/^extern const AVFilter ff_[avfsinkrc]\{2,5\}_\([[:alnum:]_]\{1,\}\);/\1_filter/p from 4.4 onwards
14761487 // Need to find and open the specified file
14771488 const string file = m_rootDirectory + " libavfilter/allfilters.c" ;
14781489 string findFile;
@@ -1481,8 +1492,12 @@ bool ConfigGenerator::passFullFilterName(const string& param1, string& returnStr
14811492 }
14821493
14831494 // Find the search pattern in the file
1484- const string search = " extern AVFilter ff_" ;
1495+ string search = " extern AVFilter ff_" ;
14851496 uint start = findFile.find (search);
1497+ if (start == string::npos) {
1498+ search = " extern const AVFilter ff_" ;
1499+ start = findFile.find (search);
1500+ }
14861501 while (start != string::npos) {
14871502 // Find the start and end of the tag
14881503 start += search.length ();
0 commit comments