Always call PlaybackManager::Init() in FormatChanged(). This makes
sure we don't deal with stale PlayingState and other outdated data when the Controller initializes to a new file, but does not need to teardown the old and setup new media nodes. Fixes ticket #3855. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38551 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -86,13 +86,13 @@ NodeManager::Init(BRect videoBounds, float videoFrameRate,
|
||||
PlaybackManager::Init(videoFrameRate, loopingMode, loopingEnabled, speed);
|
||||
|
||||
// get some objects from a derived class
|
||||
if (!fVideoTarget)
|
||||
if (fVideoTarget == NULL)
|
||||
fVideoTarget = CreateVideoTarget();
|
||||
|
||||
if (!fVideoSupplier)
|
||||
if (fVideoSupplier == NULL)
|
||||
fVideoSupplier = CreateVideoSupplier();
|
||||
|
||||
if (!fAudioSupplier)
|
||||
if (fAudioSupplier == NULL)
|
||||
fAudioSupplier = CreateAudioSupplier();
|
||||
|
||||
return FormatChanged(videoBounds, videoFrameRate, preferredVideoFormat,
|
||||
@@ -145,11 +145,8 @@ NodeManager::FormatChanged(BRect videoBounds, float videoFrameRate,
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
if (videoFrameRate != FramesPerSecond()) {
|
||||
TRACE(" -> need to Init()\n");
|
||||
PlaybackManager::Init(videoFrameRate, LoopMode(), IsLoopingEnabled(),
|
||||
Speed(), MODE_PLAYING_PAUSED_FORWARD, CurrentFrame());
|
||||
}
|
||||
PlaybackManager::Init(videoFrameRate, LoopMode(), IsLoopingEnabled(),
|
||||
Speed(), MODE_PLAYING_PAUSED_FORWARD, CurrentFrame());
|
||||
|
||||
_StopNodes();
|
||||
_TearDownNodes();
|
||||
|
||||
Reference in New Issue
Block a user