summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2010-05-07 10:10:55 +0100
committerBastien Nocera <hadess@hadess.net>2010-05-07 10:12:54 +0100
commitf6fa6e869330bb2e64b67f966f6873412c3ca081 (patch)
tree6e7f1433f6c1d5ce42f296f7b198734d6b852ac1
parent261b53120fea3ba2e1959ce56533e7a4d207ae45 (diff)
downloadtotem-f6fa6e869330bb2e64b67f966f6873412c3ca081.tar.gz
Fix position when QT gets to EOS
When QuickTime reaches the end of a stream, the expected behaviour is for the position to stay at the end of the file, rather than back at 0.
-rw-r--r--browser-plugin/totemPlugin.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/browser-plugin/totemPlugin.cpp b/browser-plugin/totemPlugin.cpp
index 25cf7ff1b..5382bb23b 100644
--- a/browser-plugin/totemPlugin.cpp
+++ b/browser-plugin/totemPlugin.cpp
@@ -1276,9 +1276,12 @@ totemPlugin::TickCallback (DBusGProxy *proxy,
scriptable->mPluginState = totemNarrowSpacePlayer::eState_Playable;
break;
case TOTEM_STATE_STOPPED:
- if (scriptable->mPluginState == totemNarrowSpacePlayer::eState_Playable)
+ if (scriptable->mPluginState == totemNarrowSpacePlayer::eState_Playable) {
scriptable->mPluginState = totemNarrowSpacePlayer::eState_Complete;
- else
+ /* The QuickTime plugin expects the duration to be the
+ * length of the file on EOS */
+ plugin->mTime = plugin->mDuration;
+ } else
scriptable->mPluginState = totemNarrowSpacePlayer::eState_Waiting;
break;
default: