diff options
-rw-r--r-- | xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.cpp | 13 | ||||
-rw-r--r-- | xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.h | 1 |
2 files changed, 10 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}; }; |