From df1338601584b90114116fa64a61cea1fd5f76e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Fri, 6 Jun 2008 10:33:47 +0000 Subject: [PATCH] Do not insert a new playing state when seeking to the same frame. In the end, this results in trying to decode the last frame again, which would the decoder to seek unnecessarily. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25820 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/mediaplayer/media_node_framework/PlaybackManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/apps/mediaplayer/media_node_framework/PlaybackManager.cpp b/src/apps/mediaplayer/media_node_framework/PlaybackManager.cpp index 135d08917d..8778003865 100644 --- a/src/apps/mediaplayer/media_node_framework/PlaybackManager.cpp +++ b/src/apps/mediaplayer/media_node_framework/PlaybackManager.cpp @@ -351,6 +351,8 @@ PlaybackManager::DurationChanged() void PlaybackManager::SetCurrentFrame(int64 frame) { + if (_LastState()->current_frame == frame) + return; PlayingState* newState = new PlayingState(*_LastState()); newState->current_frame = frame; _PushState(newState, false);