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



commit f6fa6e869330bb2e64b67f966f6873412c3ca081
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 25cf7ff..5382bb2 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:



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