diff --git a/src/encoder_x265.cpp b/src/encoder_x265.cpp index 3475aae..e5bf675 100644 --- a/src/encoder_x265.cpp +++ b/src/encoder_x265.cpp @@ -32,8 +32,8 @@ #include //x265 version info -static const unsigned int VERSION_X265_MINIMUM_VER = 10; -static const unsigned int VERSION_X265_MINIMUM_REV = 38; +static const unsigned int VERSION_X265_MINIMUM_VER = 11; +static const unsigned int VERSION_X265_MINIMUM_REV = 0; // ------------------------------------------------------------ // Helper Macros @@ -188,7 +188,8 @@ const QString &X265Encoder::getName(void) void X265Encoder::checkVersion_init(QList &patterns, QStringList &cmdLine) { cmdLine << "--version"; - patterns << new QRegExp("\\bHEVC\\s+encoder\\s+version\\s+(\\d)\\.(\\d+)\\+(\\d+)-[a-f0-9]+\\b", Qt::CaseInsensitive); + patterns << new QRegExp("\\bHEVC\\s+encoder\\s+version\\s+(\\d)\\.(\\d+)\\+(\\d+)\\b", Qt::CaseInsensitive); + patterns << new QRegExp("\\bHEVC\\s+encoder\\s+version\\s+(\\d)\\.(\\d+)\\b", Qt::CaseInsensitive); } void X265Encoder::checkVersion_parseLine(const QString &line, QList &patterns, unsigned int &core, unsigned int &build, bool &modified) @@ -208,6 +209,18 @@ void X265Encoder::checkVersion_parseLine(const QString &line, QList &p } if(ok[2]) build = temp[2]; } + else if((offset = patterns[1]->lastIndexIn(line)) >= 0) + { + bool ok[2] = { false, false }; + unsigned int temp[2]; + temp[0] = patterns[1]->cap(1).toUInt(&ok[0]); + temp[1] = patterns[1]->cap(2).toUInt(&ok[1]); + if(ok[0] && ok[1]) + { + core = (10 * temp[0]) + temp[1]; + } + build = 0; + } if(!line.isEmpty()) { diff --git a/src/version.h b/src/version.h index 9486c4b..ea4202d 100644 --- a/src/version.h +++ b/src/version.h @@ -26,7 +26,7 @@ #define VER_X264_MAJOR 2 #define VER_X264_MINOR 4 #define VER_X264_PATCH 0 -#define VER_X264_BUILD 876 +#define VER_X264_BUILD 878 #define VER_X264_PORTABLE_EDITION (0)