Advertisement
Guest User

Untitled

a guest
Jan 3rd, 2013
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.93 KB | None | 0 0
  1. diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp
  2. index aac591c..6f69988 100644
  3. --- a/xbmc/cores/omxplayer/OMXPlayer.cpp
  4. +++ b/xbmc/cores/omxplayer/OMXPlayer.cpp
  5. @@ -3711,7 +3711,7 @@ bool COMXPlayer::GetCurrentSubtitle(CStdString& strSubtitle)
  6.    if (m_pInputStream && m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD))
  7.      return false;
  8.  
  9. -  double pts = m_av_clock.OMXMediaTime(false, false);
  10. +  double pts = m_av_clock.OMXMediaTime(true, false);
  11.  
  12.    m_player_subtitle.GetCurrentSubtitle(strSubtitle, pts - m_player_video.GetSubtitleDelay());
  13.  
  14. diff --git a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
  15. index 065cd73..58b94c0 100644
  16. --- a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
  17. +++ b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
  18. @@ -215,9 +215,11 @@ void OMXPlayerVideo::OnExit()
  19.  
  20.  void OMXPlayerVideo::ProcessOverlays(int iGroupId, double pts)
  21.  {
  22. +  double iSubtitleDelay = m_iSubtitleDelay - (OMX_PRE_ROLL * 1000);
  23. +
  24.    // remove any overlays that are out of time
  25.    if (m_started)
  26. -    m_pOverlayContainer->CleanUp(pts - m_iSubtitleDelay);
  27. +    m_pOverlayContainer->CleanUp(pts - iSubtitleDelay);
  28.  
  29.    enum EOverlay
  30.    { OVERLAY_AUTO // select mode auto
  31. @@ -275,7 +277,7 @@ void OMXPlayerVideo::ProcessOverlays(int iGroupId, double pts)
  32.        if(pOverlay->iGroupId != iGroupId)
  33.          continue;
  34.  
  35. -      double pts2 = pOverlay->bForced ? pts : pts - m_iSubtitleDelay;
  36. +      double pts2 = pOverlay->bForced ? pts : pts - iSubtitleDelay;
  37.  
  38.        if((pOverlay->iPTSStartTime <= pts2 && (pOverlay->iPTSStopTime > pts2 || pOverlay->iPTSStopTime == 0LL)) || pts == 0)
  39.        {
  40. @@ -290,7 +292,7 @@ void OMXPlayerVideo::ProcessOverlays(int iGroupId, double pts)
  41.  
  42.      for(it = overlays.begin(); it != overlays.end(); ++it)
  43.      {
  44. -      double pts2 = (*it)->bForced ? pts : pts - m_iSubtitleDelay;
  45. +      double pts2 = (*it)->bForced ? pts : pts - iSubtitleDelay;
  46.  
  47.        if (render == OVERLAY_GPU)
  48.          g_renderManager.AddOverlay(*it, pts2);
  49. @@ -835,4 +837,3 @@ void OMXPlayerVideo::RenderUpdateCallBack(const void *ctx, const CRect &SrcRect,
  50.    OMXPlayerVideo *player = (OMXPlayerVideo*)ctx;
  51.    player->SetVideoRect(SrcRect, DestRect);
  52.  }
  53. -
  54. diff --git a/xbmc/linux/OMXClock.cpp b/xbmc/linux/OMXClock.cpp
  55. index 7f0461e..22f61d1 100644
  56. --- a/xbmc/linux/OMXClock.cpp
  57. +++ b/xbmc/linux/OMXClock.cpp
  58. @@ -36,8 +36,6 @@ int64_t OMXClock::m_systemOffset;
  59.  int64_t OMXClock::m_systemFrequency;
  60.  bool    OMXClock::m_ismasterclock;
  61.  
  62. -#define OMX_PRE_ROLL 800
  63. -
  64.  OMXClock::OMXClock()
  65.  {
  66.    m_has_video   = false;
  67. diff --git a/xbmc/linux/OMXClock.h b/xbmc/linux/OMXClock.h
  68. index 05eedf4..f9c8639 100644
  69. --- a/xbmc/linux/OMXClock.h
  70. +++ b/xbmc/linux/OMXClock.h
  71. @@ -45,6 +45,8 @@ static inline int64_t FromOMXTime(OMX_TICKS ticks)
  72.  #define ToOMXTime(x) (x)
  73.  #endif
  74.  
  75. +#define OMX_PRE_ROLL 800
  76. +
  77.  enum {
  78.    AV_SYNC_AUDIO_MASTER,
  79.    AV_SYNC_VIDEO_MASTER,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement