aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h3
-rw-r--r--xbmc/cores/dvdplayer/DVDPlayer.cpp12
-rw-r--r--xbmc/cores/dvdplayer/DVDPlayer.h2
3 files changed, 13 insertions, 4 deletions
diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
index 70f37caaf0..74c26ce8f8 100644
--- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
+++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
@@ -99,6 +99,7 @@ public:
ExtraSize = 0;
memset(language, 0, sizeof(language));
disabled = false;
+ changes = 0;
flags = FLAG_NONE;
}
@@ -130,6 +131,8 @@ public:
char language[4]; // ISO 639 3-letter language code (empty string if undefined)
bool disabled; // set when stream is disabled. (when no decoder exists)
+ int changes; // increment on change which player may need to know about
+
enum EFlags
{ FLAG_NONE = 0x0000
, FLAG_DEFAULT = 0x0001
diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp
index bc26e41317..3ebf5aed93 100644
--- a/xbmc/cores/dvdplayer/DVDPlayer.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp
@@ -1278,7 +1278,8 @@ void CDVDPlayer::ProcessPacket(CDemuxStream* pStream, DemuxPacket* pPacket)
void CDVDPlayer::ProcessAudioData(CDemuxStream* pStream, DemuxPacket* pPacket)
{
- if (m_CurrentAudio.stream != (void*)pStream)
+ if (m_CurrentAudio.stream != (void*)pStream
+ || m_CurrentAudio.changes != pStream->changes)
{
/* check so that dmuxer hints or extra data hasn't changed */
/* if they have, reopen stream */
@@ -1326,7 +1327,8 @@ void CDVDPlayer::ProcessAudioData(CDemuxStream* pStream, DemuxPacket* pPacket)
void CDVDPlayer::ProcessVideoData(CDemuxStream* pStream, DemuxPacket* pPacket)
{
- if (m_CurrentVideo.stream != (void*)pStream)
+ if (m_CurrentVideo.stream != (void*)pStream
+ || m_CurrentVideo.changes != pStream->changes)
{
/* check so that dmuxer hints or extra data hasn't changed */
/* if they have reopen stream */
@@ -1358,7 +1360,8 @@ void CDVDPlayer::ProcessVideoData(CDemuxStream* pStream, DemuxPacket* pPacket)
void CDVDPlayer::ProcessSubData(CDemuxStream* pStream, DemuxPacket* pPacket)
{
- if (m_CurrentSubtitle.stream != (void*)pStream)
+ if (m_CurrentSubtitle.stream != (void*)pStream
+ || m_CurrentSubtitle.changes != pStream->changes)
{
/* check so that dmuxer hints or extra data hasn't changed */
/* if they have reopen stream */
@@ -1386,7 +1389,8 @@ void CDVDPlayer::ProcessSubData(CDemuxStream* pStream, DemuxPacket* pPacket)
void CDVDPlayer::ProcessTeletextData(CDemuxStream* pStream, DemuxPacket* pPacket)
{
- if (m_CurrentTeletext.stream != (void*)pStream)
+ if (m_CurrentTeletext.stream != (void*)pStream
+ || m_CurrentTeletext.changes != pStream->changes)
{
/* check so that dmuxer hints or extra data hasn't changed */
/* if they have, reopen stream */
diff --git a/xbmc/cores/dvdplayer/DVDPlayer.h b/xbmc/cores/dvdplayer/DVDPlayer.h
index 7dd85c0180..cbb49d53ea 100644
--- a/xbmc/cores/dvdplayer/DVDPlayer.h
+++ b/xbmc/cores/dvdplayer/DVDPlayer.h
@@ -67,6 +67,7 @@ public:
double dur; // last frame expected duration
CDVDStreamInfo hint; // stream hints, used to notice stream changes
void* stream; // pointer or integer, identifying stream playing. if it changes stream changed
+ int changes; // remembered counter from stream to track codec changes
bool inited;
bool started; // has the player started
const StreamType type;
@@ -89,6 +90,7 @@ public:
dur = DVD_NOPTS_VALUE;
hint.Clear();
stream = NULL;
+ changes = 0;
inited = false;
started = false;
startpts = DVD_NOPTS_VALUE;