Skip to content

Commit

Permalink
VideoPlayer: Fix stereo mode detection from filename in GetVideoStrea…
Browse files Browse the repository at this point in the history
…mInfo
  • Loading branch information
popcornmix committed Apr 3, 2020
1 parent 2e8dd43 commit db3e601
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions xbmc/cores/VideoPlayer/VideoPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4956,6 +4956,16 @@ void CVideoPlayer::GetVideoStreamInfo(int streamId, VideoStreamInfo &info)
info.videoAspectRatio = s.aspect_ratio;
info.stereoMode = s.stereo_mode;
info.flags = s.flags;

if (info.stereoMode.empty())
{
CGUIComponent *gui = CServiceBroker::GetGUI();
if (gui != nullptr)
{
const CStereoscopicsManager &stereoscopicsManager = gui->GetStereoscopicsManager();
info.stereoMode = stereoscopicsManager.DetectStereoModeByString(s.filename);
}
}
}

int CVideoPlayer::GetVideoStreamCount() const
Expand Down

0 comments on commit db3e601

Please sign in to comment.