[totem/gnome-2-28] Fix position when QT gets to EOS



commit 8fda70ca9a2524f577548f342db7f4b45b87fb8f
Author: Bastien Nocera <hadess hadess net>
Date:   Fri May 7 10:10:55 2010 +0100

    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.

 browser-plugin/totemPlugin.cpp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/browser-plugin/totemPlugin.cpp b/browser-plugin/totemPlugin.cpp
index 0e11843..f833749 100644
--- a/browser-plugin/totemPlugin.cpp
+++ b/browser-plugin/totemPlugin.cpp
@@ -1230,9 +1230,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:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]