Bug 1123669 - Reset mDrainComplete flag and implement overridden flush() for audio. r=ajones

This commit is contained in:
Blake Wu 2015-02-16 11:16:31 +08:00
parent b675f67bd3
commit 0f9769a61f
3 changed files with 13 additions and 1 deletions

View File

@ -247,4 +247,14 @@ void GonkAudioDecoderManager::ReleaseAudioBuffer() {
}
}
nsresult
GonkAudioDecoderManager::Flush()
{
GonkDecoderManager::Flush();
status_t err = mDecoder->flush();
if (err != OK) {
return NS_ERROR_FAILURE;
}
return NS_OK;
}
} // namespace mozilla

View File

@ -32,6 +32,8 @@ public:
virtual nsresult Output(int64_t aStreamOffset,
nsRefPtr<MediaData>& aOutput) MOZ_OVERRIDE;
virtual nsresult Flush() MOZ_OVERRIDE;
protected:
virtual bool PerformFormatSpecificProcess(mp4_demuxer::MP4Sample* aSample) MOZ_OVERRIDE;

View File

@ -234,7 +234,7 @@ GonkMediaDataDecoder::Flush()
// it's executing at all. Note the MP4Reader ignores all output while
// flushing.
mTaskQueue->Flush();
mDrainComplete = false;
return mManager->Flush();
}