Bug 1297265: P12. Rework WAV Decoder use of InputExhausted. r?gerald draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 01 Sep 2016 20:04:48 +1000
changeset 408645 adef06e6236ea9169a921a76fcd8c3a106abc0f8
parent 408644 046e29f0a3eee2db0612bca3d45ba4493ea28859
child 530155 7edfb96f160961744257aa8c8f9916a566b56904
push id28262
push userbmo:jyavenard@mozilla.com
push dateThu, 01 Sep 2016 12:26:45 +0000
reviewersgerald
bugs1297265
milestone51.0a1
Bug 1297265: P12. Rework WAV Decoder use of InputExhausted. r?gerald MozReview-Commit-ID: A2BCy4hmL2
dom/media/platforms/agnostic/WAVDecoder.cpp
--- 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();