Merge "resolved conflicts for merge of 3d630e86 to master"

This commit is contained in:
Andreas Huber
2011-11-30 09:55:47 -08:00
committed by Android (Google) Code Review
2 changed files with 20 additions and 2 deletions

View File

@@ -463,11 +463,24 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
{
ALOGV("kWhatReset");
if (mRenderer != NULL) {
// There's an edge case where the renderer owns all output
// buffers and is paused, therefore the decoder will not read
// more input data and will never encounter the matching
// discontinuity. To avoid this, we resume the renderer.
if (mFlushingAudio == AWAITING_DISCONTINUITY
|| mFlushingVideo == AWAITING_DISCONTINUITY) {
mRenderer->resume();
}
}
if (mFlushingAudio != NONE || mFlushingVideo != NONE) {
// We're currently flushing, postpone the reset until that's
// completed.
ALOGV("postponing reset");
ALOGV("postponing reset mFlushingAudio=%d, mFlushingVideo=%d",
mFlushingAudio, mFlushingVideo);
mResetPostponed = true;
break;

View File

@@ -628,11 +628,16 @@ void NuPlayer::Renderer::onPause() {
mAudioSink->pause();
}
ALOGV("now paused audio queue has %d entries, video has %d entries",
mAudioQueue.size(), mVideoQueue.size());
mPaused = true;
}
void NuPlayer::Renderer::onResume() {
CHECK(mPaused);
if (!mPaused) {
return;
}
if (mHasAudio) {
mAudioSink->start();