Skip to content

Commit

Permalink
Always acquire lock when using OMXMediaTime
Browse files Browse the repository at this point in the history
I don't believe the lock=false call should ever be done unless caller already has lock
  • Loading branch information
popcornmix authored and davilla committed Apr 9, 2013
1 parent ef1d094 commit 21b0b8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions xbmc/cores/omxplayer/OMXPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3729,7 +3729,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(false);

m_player_subtitle.GetCurrentSubtitle(strSubtitle, pts - m_player_video.GetSubtitleDelay());

Expand Down Expand Up @@ -3890,7 +3890,7 @@ void COMXPlayer::UpdatePlayState(double timeout)

// TODO : workaround until omx clock handling is rewritten
if(m_playSpeed == DVD_PLAYSPEED_NORMAL)
state.time = DVD_TIME_TO_MSEC(m_av_clock.OMXMediaTime(true, true));
state.time = DVD_TIME_TO_MSEC(m_av_clock.OMXMediaTime(true));
else
state.time = DVD_TIME_TO_MSEC(m_av_clock.GetClock() + m_offset_pts);
state.time_total = m_pDemuxer->GetStreamLength();
Expand Down
2 changes: 1 addition & 1 deletion xbmc/cores/omxplayer/OMXPlayerVideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ void OMXPlayerVideo::Output(int iGroupId, double pts, bool bDropPacket)
if (!CThread::m_bStop && m_av_clock->GetAbsoluteClock(false) < m_iSleepEndTime + DVD_MSEC_TO_TIME(500))
return;

double pts_media = m_av_clock->OMXMediaTime(false, false);
double pts_media = m_av_clock->OMXMediaTime(false);
ProcessOverlays(iGroupId, pts_media);

g_renderManager.FlipPage(CThread::m_bStop, m_iSleepEndTime / DVD_TIME_BASE, -1, FS_NONE);
Expand Down

0 comments on commit 21b0b8e

Please sign in to comment.