aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Zelend <ace20022@xbmc.org>2014-08-31 16:31:38 +0200
committerAndreas Zelend <ace20022@xbmc.org>2014-08-31 16:31:38 +0200
commitb07a63384b3de9dca3313268fc01efb2b4ef479f (patch)
treeac85e0a4d3e528b50f17b3c3fc7f24c8a58dd4c6
parent7cb556aa05ddb3f99e7386aac0dc98a622391ae0 (diff)
parent5781eb09cc34023396a8824b596cadbefbb9cb01 (diff)
Merge pull request #5273 from ace20022/ticket_15371
[Fix] When changing subtitles the cached overlays must be cleared.
-rw-r--r--xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp12
-rw-r--r--xbmc/cores/dvdplayer/DVDPlayerSubtitle.h2
2 files changed, 7 insertions, 7 deletions
diff --git a/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp b/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp
index 125f96ce48..a3da90d043 100644
--- a/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp
@@ -53,7 +53,7 @@ CDVDPlayerSubtitle::CDVDPlayerSubtitle(CDVDOverlayContainer* pOverlayContainer)
CDVDPlayerSubtitle::~CDVDPlayerSubtitle()
{
- CloseStream(false);
+ CloseStream(true);
}
@@ -145,7 +145,7 @@ bool CDVDPlayerSubtitle::OpenStream(CDVDStreamInfo &hints, string &filename)
{
CSingleLock lock(m_section);
- CloseStream(false);
+ CloseStream(true);
m_streaminfo = hints;
// okey check if this is a filesubtitle
@@ -155,14 +155,14 @@ bool CDVDPlayerSubtitle::OpenStream(CDVDStreamInfo &hints, string &filename)
if (!m_pSubtitleFileParser)
{
CLog::Log(LOGERROR, "%s - Unable to create subtitle parser", __FUNCTION__);
- CloseStream(false);
+ CloseStream(true);
return false;
}
if (!m_pSubtitleFileParser->Open(hints))
{
CLog::Log(LOGERROR, "%s - Unable to init subtitle parser", __FUNCTION__);
- CloseStream(false);
+ CloseStream(true);
return false;
}
m_pSubtitleFileParser->Reset();
@@ -181,7 +181,7 @@ bool CDVDPlayerSubtitle::OpenStream(CDVDStreamInfo &hints, string &filename)
return false;
}
-void CDVDPlayerSubtitle::CloseStream(bool flush)
+void CDVDPlayerSubtitle::CloseStream(bool bWaitForBuffers)
{
CSingleLock lock(m_section);
@@ -194,7 +194,7 @@ void CDVDPlayerSubtitle::CloseStream(bool flush)
m_dvdspus.FlushCurrentPacket();
- if(flush)
+ if (!bWaitForBuffers)
m_pOverlayContainer->Clear();
}
diff --git a/xbmc/cores/dvdplayer/DVDPlayerSubtitle.h b/xbmc/cores/dvdplayer/DVDPlayerSubtitle.h
index 7e7baf02cb..76d463571b 100644
--- a/xbmc/cores/dvdplayer/DVDPlayerSubtitle.h
+++ b/xbmc/cores/dvdplayer/DVDPlayerSubtitle.h
@@ -50,7 +50,7 @@ public:
void SendMessage(CDVDMsg* pMsg, int priority = 0);
bool OpenStream(CDVDStreamInfo &hints) { return OpenStream(hints, hints.filename); }
bool OpenStream(CDVDStreamInfo &hints, std::string& filename);
- void CloseStream(bool flush);
+ void CloseStream(bool bWaitForBuffers);
bool IsInited() const { return true; }
bool IsStalled() const { return m_pOverlayContainer->GetSize() == 0; }