diff --git a/Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.cpp b/Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.cpp index d5836c90..782dc71b 100644 --- a/Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.cpp +++ b/Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.cpp @@ -328,10 +328,16 @@ bool plMoviePlayer::Start() // Need to figure out scaling based on pipe size. plPlateManager& plateMgr = plPlateManager::Instance(); const mkvparser::VideoTrack* video = static_cast(fVideoTrack->GetTrack()); - float width = (static_cast(video->GetWidth()) / static_cast(plateMgr.GetPipeWidth())) * fScale.fX; - float height = (static_cast(video->GetHeight()) / static_cast(plateMgr.GetPipeHeight())) * fScale.fY; - - plateMgr.CreatePlate(&fPlate, fPosition.fX, fPosition.fY, width, height); + float plateWidth = video->GetWidth() * fScale.fX; + float plateHeight = video->GetHeight() * fScale.fY; + if (plateWidth > plateMgr.GetPipeWidth() || plateHeight > plateMgr.GetPipeHeight()) + { + float scale = std::min(plateMgr.GetPipeWidth() / plateWidth, plateMgr.GetPipeHeight() / plateHeight); + plateWidth *= scale; + plateHeight *= scale; + } + plateMgr.CreatePlate(&fPlate, fPosition.fX, fPosition.fY, 0, 0); + plateMgr.SetPlatePixelSize(fPlate, plateWidth, plateHeight); fTexture = fPlate->CreateMaterial(static_cast(video->GetWidth()), static_cast(video->GetHeight()), false); //initialize opus