diff --git a/src/apps/mediaplayer/Controller.cpp b/src/apps/mediaplayer/Controller.cpp index 77085ad027..5bcaa26248 100644 --- a/src/apps/mediaplayer/Controller.cpp +++ b/src/apps/mediaplayer/Controller.cpp @@ -258,8 +258,13 @@ Controller::SetTo(const entry_ref &ref) preferredVideoFormat = format.u.raw_video.display.format; } - Init(BRect(0, 0, width - 1, height - 1), fVideoFrameRate, - preferredVideoFormat, LOOPING_ALL, false); + if (InitCheck() != B_OK) { + Init(BRect(0, 0, width - 1, height - 1), fVideoFrameRate, + preferredVideoFormat, LOOPING_ALL, false); + } else { + FormatChanged(BRect(0, 0, width - 1, height - 1), fVideoFrameRate, + preferredVideoFormat); + } SetCurrentFrame(0); diff --git a/src/apps/mediaplayer/media_node_framework/NodeManager.cpp b/src/apps/mediaplayer/media_node_framework/NodeManager.cpp index e4eac6d861..705b343fed 100644 --- a/src/apps/mediaplayer/media_node_framework/NodeManager.cpp +++ b/src/apps/mediaplayer/media_node_framework/NodeManager.cpp @@ -119,11 +119,16 @@ status_t NodeManager::FormatChanged(BRect videoBounds, float videoFrameRate, color_space preferredVideoFormat, bool force) { + TRACE("NodeManager::FormatChanged()\n"); + if (!force && videoBounds == VideoBounds() - && videoFrameRate == FramesPerSecond()) + && videoFrameRate == FramesPerSecond()) { + TRACE(" -> reusing existing nodes\n"); return B_OK; + } if (videoFrameRate != FramesPerSecond()) { + TRACE(" -> need to Init()\n"); PlaybackManager::Init(videoFrameRate, LoopMode(), IsLoopingEnabled(), Speed(), MODE_PLAYING_PAUSED_FORWARD, CurrentFrame()); }