Loading media/libstagefright/AwesomePlayer.cpp +36 −1 Original line number Diff line number Diff line Loading @@ -1931,7 +1931,7 @@ void AwesomePlayer::onVideoEvent() { ++mStats.mNumVideoFramesDropped; } postVideoEvent_l(); postVideoEvent_l(0); return; } } Loading Loading @@ -1971,6 +1971,41 @@ void AwesomePlayer::onVideoEvent() { return; } /* get next frame time */ if (wasSeeking == NO_SEEK) { MediaSource::ReadOptions options; for (;;) { status_t err = mVideoSource->read(&mVideoBuffer, &options); if (err != OK) { // deal with any errors next time CHECK(mVideoBuffer == NULL); postVideoEvent_l(0); return; } if (mVideoBuffer->range_length() != 0) { break; } // Some decoders, notably the PV AVC software decoder // return spurious empty buffers that we just want to ignore. mVideoBuffer->release(); mVideoBuffer = NULL; } { Mutex::Autolock autoLock(mStatsLock); ++mStats.mNumVideoFramesDecoded; } int64_t nextTimeUs; CHECK(mVideoBuffer->meta_data()->findInt64(kKeyTime, &nextTimeUs)); int64_t delayUs = nextTimeUs - ts->getRealTimeUs() + mTimeSourceDeltaUs; postVideoEvent_l(delayUs > 10000 ? 10000 : delayUs < 0 ? 0 : delayUs); return; } postVideoEvent_l(); } Loading Loading
media/libstagefright/AwesomePlayer.cpp +36 −1 Original line number Diff line number Diff line Loading @@ -1931,7 +1931,7 @@ void AwesomePlayer::onVideoEvent() { ++mStats.mNumVideoFramesDropped; } postVideoEvent_l(); postVideoEvent_l(0); return; } } Loading Loading @@ -1971,6 +1971,41 @@ void AwesomePlayer::onVideoEvent() { return; } /* get next frame time */ if (wasSeeking == NO_SEEK) { MediaSource::ReadOptions options; for (;;) { status_t err = mVideoSource->read(&mVideoBuffer, &options); if (err != OK) { // deal with any errors next time CHECK(mVideoBuffer == NULL); postVideoEvent_l(0); return; } if (mVideoBuffer->range_length() != 0) { break; } // Some decoders, notably the PV AVC software decoder // return spurious empty buffers that we just want to ignore. mVideoBuffer->release(); mVideoBuffer = NULL; } { Mutex::Autolock autoLock(mStatsLock); ++mStats.mNumVideoFramesDecoded; } int64_t nextTimeUs; CHECK(mVideoBuffer->meta_data()->findInt64(kKeyTime, &nextTimeUs)); int64_t delayUs = nextTimeUs - ts->getRealTimeUs() + mTimeSourceDeltaUs; postVideoEvent_l(delayUs > 10000 ? 10000 : delayUs < 0 ? 0 : delayUs); return; } postVideoEvent_l(); } Loading