[rbp/omxplayer] Fix stall when resuming avi file without valid pts
authorpopcornmix <popcornmix@gmail.com>
Tue, 7 Jan 2014 21:25:38 +0000 (21:25 +0000)
committerpopcornmix <popcornmix@gmail.com>
Tue, 7 Jan 2014 21:25:38 +0000 (21:25 +0000)
Revert it for now until a better solution is found.

xbmc/cores/omxplayer/OMXAudio.cpp
xbmc/cores/omxplayer/OMXVideo.cpp

index 440a26e..5e5efea 100644 (file)
@@ -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);
index ebe2e4a..006cede 100644 (file)
@@ -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);