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);
|
PlaybackManager::Init(videoFrameRate, loopingMode, loopingEnabled, speed);
|
||||||
|
|
||||||
// get some objects from a derived class
|
// get some objects from a derived class
|
||||||
if (!fVideoTarget)
|
if (fVideoTarget == NULL)
|
||||||
fVideoTarget = CreateVideoTarget();
|
fVideoTarget = CreateVideoTarget();
|
||||||
|
|
||||||
if (!fVideoSupplier)
|
if (fVideoSupplier == NULL)
|
||||||
fVideoSupplier = CreateVideoSupplier();
|
fVideoSupplier = CreateVideoSupplier();
|
||||||
|
|
||||||
if (!fAudioSupplier)
|
if (fAudioSupplier == NULL)
|
||||||
fAudioSupplier = CreateAudioSupplier();
|
fAudioSupplier = CreateAudioSupplier();
|
||||||
|
|
||||||
return FormatChanged(videoBounds, videoFrameRate, preferredVideoFormat,
|
return FormatChanged(videoBounds, videoFrameRate, preferredVideoFormat,
|
||||||
@@ -145,11 +145,8 @@ NodeManager::FormatChanged(BRect videoBounds, float videoFrameRate,
|
|||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (videoFrameRate != FramesPerSecond()) {
|
PlaybackManager::Init(videoFrameRate, LoopMode(), IsLoopingEnabled(),
|
||||||
TRACE(" -> need to Init()\n");
|
Speed(), MODE_PLAYING_PAUSED_FORWARD, CurrentFrame());
|
||||||
PlaybackManager::Init(videoFrameRate, LoopMode(), IsLoopingEnabled(),
|
|
||||||
Speed(), MODE_PLAYING_PAUSED_FORWARD, CurrentFrame());
|
|
||||||
}
|
|
||||||
|
|
||||||
_StopNodes();
|
_StopNodes();
|
||||||
_TearDownNodes();
|
_TearDownNodes();
|
||||||
|
|||||||
Reference in New Issue
Block a user