aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.cpp13
-rw-r--r--xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.h1
-rw-r--r--xbmc/cores/VideoPlayer/Interface/StreamInfo.h1
-rw-r--r--xbmc/platform/android/activity/XBMCApp.cpp5
4 files changed, 16 insertions, 4 deletions
diff --git a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.cpp b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.cpp
index 1f1622318d..7b8be41763 100644
--- a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.cpp
+++ b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.cpp
@@ -40,8 +40,9 @@ bool CInputStreamPVRBase::IsEOF()
bool CInputStreamPVRBase::Open()
{
- if (CDVDInputStream::Open() && OpenPVRStream())
+ if (!m_isOpen && CDVDInputStream::Open() && OpenPVRStream())
{
+ m_isOpen = true;
m_eof = false;
m_StreamProps->iStreamCount = 0;
return true;
@@ -54,9 +55,13 @@ bool CInputStreamPVRBase::Open()
void CInputStreamPVRBase::Close()
{
- ClosePVRStream();
- CDVDInputStream::Close();
- m_eof = true;
+ if (m_isOpen)
+ {
+ ClosePVRStream();
+ CDVDInputStream::Close();
+ m_eof = true;
+ m_isOpen = false;
+ }
}
int CInputStreamPVRBase::Read(uint8_t* buf, int buf_size)
diff --git a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.h b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.h
index 67b5d32d1c..7a2d336512 100644
--- a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.h
+++ b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.h
@@ -80,4 +80,5 @@ protected:
std::shared_ptr<PVR_STREAM_PROPERTIES> m_StreamProps;
std::map<int, std::shared_ptr<CDemuxStream>> m_streamMap;
std::shared_ptr<PVR::CPVRClient> m_client;
+ bool m_isOpen{false};
};
diff --git a/xbmc/cores/VideoPlayer/Interface/StreamInfo.h b/xbmc/cores/VideoPlayer/Interface/StreamInfo.h
index 924931e9b6..9f93e86b7f 100644
--- a/xbmc/cores/VideoPlayer/Interface/StreamInfo.h
+++ b/xbmc/cores/VideoPlayer/Interface/StreamInfo.h
@@ -10,6 +10,7 @@
#include "utils/Geometry.h"
+#include <cstdint>
#include <string>
template <typename T> class CRectGen;
diff --git a/xbmc/platform/android/activity/XBMCApp.cpp b/xbmc/platform/android/activity/XBMCApp.cpp
index 10e00d0146..429a11fa06 100644
--- a/xbmc/platform/android/activity/XBMCApp.cpp
+++ b/xbmc/platform/android/activity/XBMCApp.cpp
@@ -220,6 +220,11 @@ void CXBMCApp::Announce(ANNOUNCEMENT::AnnouncementFlag flag,
m_mediaSessionUpdated = false;
UpdateSessionState();
}
+ else if (message == "OnAVStart")
+ {
+ m_mediaSessionUpdated = false;
+ UpdateSessionState();
+ }
}
else if (flag & Info)
{