diff options
-rw-r--r-- | media/libstagefright/AwesomePlayer.cpp | 19 | ||||
-rw-r--r-- | media/libstagefright/include/AwesomePlayer.h | 1 |
2 files changed, 6 insertions, 14 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index 6b0b1b9..f25d498 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -55,7 +55,6 @@ #include <cutils/properties.h> #define USE_SURFACE_ALLOC 1 -#define FRAME_DROP_FREQ 0 namespace android { @@ -1440,7 +1439,6 @@ void AwesomePlayer::onVideoEvent() { if (mFlags & FIRST_FRAME) { mFlags &= ~FIRST_FRAME; - mSinceLastDropped = 0; mTimeSourceDeltaUs = ts->getRealTimeUs() - timeUs; } @@ -1487,17 +1485,13 @@ void AwesomePlayer::onVideoEvent() { if (latenessUs > 40000) { // We're more than 40ms late. - LOGV("we're late by %lld us (%.2f secs)", latenessUs, latenessUs / 1E6); - if ( mSinceLastDropped > FRAME_DROP_FREQ) - { - LOGV("we're late by %lld us (%.2f secs) dropping one after %d frames", latenessUs, latenessUs / 1E6, mSinceLastDropped); - mSinceLastDropped = 0; - mVideoBuffer->release(); - mVideoBuffer = NULL; + LOGV("we're late by %lld us (%.2f secs), dropping frame", + latenessUs, latenessUs / 1E6); + mVideoBuffer->release(); + mVideoBuffer = NULL; - postVideoEvent_l(); - return; - } + postVideoEvent_l(); + return; } if (latenessUs < -10000) { @@ -1515,7 +1509,6 @@ void AwesomePlayer::onVideoEvent() { } if (mVideoRenderer != NULL) { - mSinceLastDropped++; mVideoRenderer->render(mVideoBuffer); } diff --git a/media/libstagefright/include/AwesomePlayer.h b/media/libstagefright/include/AwesomePlayer.h index a9b7ae8..7fd7724 100644 --- a/media/libstagefright/include/AwesomePlayer.h +++ b/media/libstagefright/include/AwesomePlayer.h @@ -163,7 +163,6 @@ private: uint32_t mFlags; uint32_t mExtractorFlags; - uint32_t mSinceLastDropped; int64_t mTimeSourceDeltaUs; int64_t mVideoTimeUs; |