Bug 1347480 - flush decoder after draining to make it accept more input. r?jya
MediaCodec doesn't take any input after EOS unless it is flushed.
MozReview-Commit-ID: LoHlN753e8J
--- a/dom/media/platforms/android/RemoteDataDecoder.cpp
+++ b/dom/media/platforms/android/RemoteDataDecoder.cpp
@@ -651,16 +651,18 @@ RemoteDataDecoder::DrainComplete()
return;
}
AssertOnTaskQueue();
if (mShutdown) {
return;
}
mDrainStatus = DrainStatus::DRAINED;
ReturnDecodedData();
+ // Make decoder accept input again.
+ mJavaDecoder->Flush();
}
void
RemoteDataDecoder::Error(const MediaResult& aError)
{
if (!mTaskQueue->IsCurrentThreadIn()) {
mTaskQueue->Dispatch(
NewRunnableMethod<MediaResult>(this, &RemoteDataDecoder::Error, aError));