summaryrefslogtreecommitdiff
path: root/src/mplayerversion.cpp
diff options
context:
space:
mode:
authorAlessio Treglia <alessio@debian.org>2012-02-16 11:06:56 +0100
committerAlessio Treglia <alessio@debian.org>2012-02-16 11:06:56 +0100
commit1d323e54ee434609cf035598486075c9a918a2d3 (patch)
tree929ad92f19dfbb5492471449f1a6a918ea99c6b8 /src/mplayerversion.cpp
parent99b53d44a60e3e934fc664152c115ae0d6e19920 (diff)
Imported Upstream version 0.6.10
Diffstat (limited to 'src/mplayerversion.cpp')
-rw-r--r--src/mplayerversion.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mplayerversion.cpp b/src/mplayerversion.cpp
index 1ffe2d0..5cdef3a 100644
--- a/src/mplayerversion.cpp
+++ b/src/mplayerversion.cpp
@@ -1,5 +1,5 @@
/* smplayer, GUI front-end for mplayer.
- Copyright (C) 2006-2010 Ricardo Villalba <rvm@escomposlinux.org>
+ Copyright (C) 2006-2011 Ricardo Villalba <rvm@escomposlinux.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,6 +29,7 @@ int MplayerVersion::mplayerVersion(QString string) {
static QRegExp rx_mplayer_revision("^MPlayer (.*)[-\\.]r(\\d+)(.*)");
static QRegExp rx_mplayer_version("^MPlayer ([a-z,0-9,.]+)-(.*)");
static QRegExp rx_mplayer_git("^MPlayer GIT(.*)", Qt::CaseInsensitive);
+ static QRegExp rx_mplayer_version_final("1.0rc([0-9])");
#ifndef Q_OS_WIN
static QRegExp rx_mplayer_version_ubuntu("^MPlayer (\\d):(\\d)\\.(\\d)~(.*)");
static QRegExp rx_mplayer_version_mandriva("^MPlayer ([a-z0-9\\.]+)-\\d+\\.([a-z0-9]+)\\.[\\d\\.]+[a-z]+[\\d\\.]+-(.*)");
@@ -76,12 +77,19 @@ int MplayerVersion::mplayerVersion(QString string) {
QString version = rx_mplayer_version.cap(1);
qDebug("MplayerVersion::mplayerVersion: MPlayer version found: %s", version.toUtf8().data());
mplayer_svn = 0;
+
if (version == "1.0rc3") mplayer_svn = MPLAYER_1_0_RC3_SVN;
else
if (version == "1.0rc2") mplayer_svn = MPLAYER_1_0_RC2_SVN;
else
if (version == "1.0rc1") mplayer_svn = MPLAYER_1_0_RC1_SVN;
- else qWarning("MplayerVersion::mplayerVersion: unknown MPlayer version");
+ else
+ if(rx_mplayer_version_final.indexIn(version) > -1 && rx_mplayer_version_final.cap(1).toInt() > 3)
+ mplayer_svn = MPLAYER_1_0_RC3_SVN; //version is > 1.0rc3, so treat as 1.0rc3 since support for later versions is not yet implemented
+
+ else
+ qWarning("MplayerVersion::mplayerVersion: unknown MPlayer version");
+
}
if (pref) {