Bug 1297265: P12. Rework WAV Decoder use of InputExhausted. r?gerald
MozReview-Commit-ID: A2BCy4hmL2
--- a/dom/media/platforms/agnostic/WAVDecoder.cpp
+++ b/dom/media/platforms/agnostic/WAVDecoder.cpp
@@ -63,16 +63,18 @@ WaveDataDecoder::Init()
return InitPromise::CreateAndResolve(TrackInfo::kAudioTrack, __func__);
}
nsresult
WaveDataDecoder::Input(MediaRawData* aSample)
{
if (!DoDecode(aSample)) {
mCallback->Error(MediaDataDecoderError::DECODE_ERROR);
+ } else {
+ mCallback->InputExhausted();
}
return NS_OK;
}
bool
WaveDataDecoder::DoDecode(MediaRawData* aSample)
{
size_t aLength = aSample->Size();