[Scummvm-cvs-logs] SF.net SVN: scummvm:[55239] scummvm/trunk/graphics/video

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Fri Jan 14 14:01:57 CET 2011


Revision: 55239
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55239&view=rev
Author:   mthreepwood
Date:     2011-01-14 13:01:57 +0000 (Fri, 14 Jan 2011)

Log Message:
-----------
VIDEO: Reset the pause start time when seeking while paused

Modified Paths:
--------------
    scummvm/trunk/graphics/video/qt_decoder.cpp
    scummvm/trunk/graphics/video/video_decoder.cpp
    scummvm/trunk/graphics/video/video_decoder.h

Modified: scummvm/trunk/graphics/video/qt_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/qt_decoder.cpp	2011-01-14 08:14:32 UTC (rev 55238)
+++ scummvm/trunk/graphics/video/qt_decoder.cpp	2011-01-14 13:01:57 UTC (rev 55239)
@@ -178,6 +178,7 @@
 
 	// Adjust the video starting point
 	_startTime = g_system->getMillis() - Graphics::VideoTimestamp(_nextFrameStartTime, _streams[_videoStreamIndex]->time_scale).getUnitsInScale(1000);
+	resetPauseStartTime();
 
 	// Adjust the audio starting point
 	if (_audioStreamIndex >= 0) {

Modified: scummvm/trunk/graphics/video/video_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/video_decoder.cpp	2011-01-14 08:14:32 UTC (rev 55238)
+++ scummvm/trunk/graphics/video/video_decoder.cpp	2011-01-14 13:01:57 UTC (rev 55239)
@@ -100,6 +100,11 @@
 	}
 }
 
+void VideoDecoder::resetPauseStartTime() {
+	if (isPaused())
+		_pauseStartTime = g_system->getMillis();
+}
+
 uint32 FixedRateVideoDecoder::getTimeToNextFrame() const {
 	if (endOfVideo() || _curFrame < 0)
 		return 0;

Modified: scummvm/trunk/graphics/video/video_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/video_decoder.h	2011-01-14 08:14:32 UTC (rev 55238)
+++ scummvm/trunk/graphics/video/video_decoder.h	2011-01-14 13:01:57 UTC (rev 55239)
@@ -176,6 +176,11 @@
 	 */
 	virtual void addPauseTime(uint32 ms) { _startTime += ms; }
 
+	/**
+	 * Reset the pause start time (which should be called when seeking)
+	 */
+	void resetPauseStartTime();
+
 	int32 _curFrame;
 	int32 _startTime;
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list