aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpopcornmix <popcornmix@gmail.com>2014-01-07 13:28:49 -0800
committerpopcornmix <popcornmix@gmail.com>2014-01-07 13:28:49 -0800
commitc6115a37590427b29218633bed3e8bce1b051f35 (patch)
treeff4b2c4c5f077e1bd6c9f8abb02c062ddb5a3d93
parent024ef6b9290cbe8ade04de2c544954d2e0689ede (diff)
parent8137a95bcbd1643e7edbc1751316dc355d42a6d1 (diff)
Merge pull request #3983 from popcornmix/revert_unknown_start
[rbp/omxplayer] Fix stall when resuming avi file without valid pts
-rw-r--r--xbmc/cores/omxplayer/OMXAudio.cpp3
-rw-r--r--xbmc/cores/omxplayer/OMXVideo.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/xbmc/cores/omxplayer/OMXAudio.cpp b/xbmc/cores/omxplayer/OMXAudio.cpp
index 440a26e71d..5e5efea339 100644
--- a/xbmc/cores/omxplayer/OMXAudio.cpp
+++ b/xbmc/cores/omxplayer/OMXAudio.cpp
@@ -947,6 +947,9 @@ unsigned int COMXAudio::AddPackets(const void* data, unsigned int len, double dt
if(m_setStartTime)
{
omx_buffer->nFlags = OMX_BUFFERFLAG_STARTTIME;
+ if(pts == DVD_NOPTS_VALUE)
+ omx_buffer->nFlags |= OMX_BUFFERFLAG_TIME_UNKNOWN;
+
m_last_pts = pts;
CLog::Log(LOGDEBUG, "COMXAudio::Decode ADec : setStartTime %f\n", (float)val / DVD_TIME_BASE);
diff --git a/xbmc/cores/omxplayer/OMXVideo.cpp b/xbmc/cores/omxplayer/OMXVideo.cpp
index ebe2e4a0d7..006ceded63 100644
--- a/xbmc/cores/omxplayer/OMXVideo.cpp
+++ b/xbmc/cores/omxplayer/OMXVideo.cpp
@@ -756,7 +756,7 @@ int COMXVideo::Decode(uint8_t *pData, int iSize, double pts)
CLog::Log(LOGDEBUG, "OMXVideo::Decode VDec : setStartTime %f\n", (pts == DVD_NOPTS_VALUE ? 0.0 : pts) / DVD_TIME_BASE);
m_setStartTime = false;
}
- else if(pts == DVD_NOPTS_VALUE)
+ if(pts == DVD_NOPTS_VALUE)
omx_buffer->nFlags |= OMX_BUFFERFLAG_TIME_UNKNOWN;
omx_buffer->nTimeStamp = ToOMXTime((uint64_t)(pts == DVD_NOPTS_VALUE) ? 0 : pts);