Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp
- index aac591c..6f69988 100644
- --- a/xbmc/cores/omxplayer/OMXPlayer.cpp
- +++ b/xbmc/cores/omxplayer/OMXPlayer.cpp
- @@ -3711,7 +3711,7 @@ bool COMXPlayer::GetCurrentSubtitle(CStdString& strSubtitle)
- if (m_pInputStream && m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD))
- return false;
- - double pts = m_av_clock.OMXMediaTime(false, false);
- + double pts = m_av_clock.OMXMediaTime(true, false);
- m_player_subtitle.GetCurrentSubtitle(strSubtitle, pts - m_player_video.GetSubtitleDelay());
- diff --git a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
- index 065cd73..58b94c0 100644
- --- a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
- +++ b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
- @@ -215,9 +215,11 @@ void OMXPlayerVideo::OnExit()
- void OMXPlayerVideo::ProcessOverlays(int iGroupId, double pts)
- {
- + double iSubtitleDelay = m_iSubtitleDelay - (OMX_PRE_ROLL * 1000);
- +
- // remove any overlays that are out of time
- if (m_started)
- - m_pOverlayContainer->CleanUp(pts - m_iSubtitleDelay);
- + m_pOverlayContainer->CleanUp(pts - iSubtitleDelay);
- enum EOverlay
- { OVERLAY_AUTO // select mode auto
- @@ -275,7 +277,7 @@ void OMXPlayerVideo::ProcessOverlays(int iGroupId, double pts)
- if(pOverlay->iGroupId != iGroupId)
- continue;
- - double pts2 = pOverlay->bForced ? pts : pts - m_iSubtitleDelay;
- + double pts2 = pOverlay->bForced ? pts : pts - iSubtitleDelay;
- if((pOverlay->iPTSStartTime <= pts2 && (pOverlay->iPTSStopTime > pts2 || pOverlay->iPTSStopTime == 0LL)) || pts == 0)
- {
- @@ -290,7 +292,7 @@ void OMXPlayerVideo::ProcessOverlays(int iGroupId, double pts)
- for(it = overlays.begin(); it != overlays.end(); ++it)
- {
- - double pts2 = (*it)->bForced ? pts : pts - m_iSubtitleDelay;
- + double pts2 = (*it)->bForced ? pts : pts - iSubtitleDelay;
- if (render == OVERLAY_GPU)
- g_renderManager.AddOverlay(*it, pts2);
- @@ -835,4 +837,3 @@ void OMXPlayerVideo::RenderUpdateCallBack(const void *ctx, const CRect &SrcRect,
- OMXPlayerVideo *player = (OMXPlayerVideo*)ctx;
- player->SetVideoRect(SrcRect, DestRect);
- }
- -
- diff --git a/xbmc/linux/OMXClock.cpp b/xbmc/linux/OMXClock.cpp
- index 7f0461e..22f61d1 100644
- --- a/xbmc/linux/OMXClock.cpp
- +++ b/xbmc/linux/OMXClock.cpp
- @@ -36,8 +36,6 @@ int64_t OMXClock::m_systemOffset;
- int64_t OMXClock::m_systemFrequency;
- bool OMXClock::m_ismasterclock;
- -#define OMX_PRE_ROLL 800
- -
- OMXClock::OMXClock()
- {
- m_has_video = false;
- diff --git a/xbmc/linux/OMXClock.h b/xbmc/linux/OMXClock.h
- index 05eedf4..f9c8639 100644
- --- a/xbmc/linux/OMXClock.h
- +++ b/xbmc/linux/OMXClock.h
- @@ -45,6 +45,8 @@ static inline int64_t FromOMXTime(OMX_TICKS ticks)
- #define ToOMXTime(x) (x)
- #endif
- +#define OMX_PRE_ROLL 800
- +
- enum {
- AV_SYNC_AUDIO_MASTER,
- AV_SYNC_VIDEO_MASTER,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement