From 97c82d5ef333455ddad6cc58ec032fb17bfadde4 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Tue, 30 Aug 2016 15:19:55 +1000 Subject: [PATCH] Bug 1297265: P4. Rework Apple AudioToolbox use of InputExhausted. r=kamidphish MozReview-Commit-ID: HznYxl9T7t5 --HG-- extra : rebase_source : aa1ebf557c56caf9572eab16df5ecaa4c1a440a6 --- dom/media/platforms/apple/AppleATDecoder.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dom/media/platforms/apple/AppleATDecoder.cpp b/dom/media/platforms/apple/AppleATDecoder.cpp index 7ec421658321..a97607326456 100644 --- a/dom/media/platforms/apple/AppleATDecoder.cpp +++ b/dom/media/platforms/apple/AppleATDecoder.cpp @@ -214,9 +214,7 @@ AppleATDecoder::SubmitSample(MediaRawData* aSample) } } mQueuedSamples.Clear(); - } - - if (mTaskQueue->IsEmpty()) { + } else { mCallback->InputExhausted(); } } @@ -282,6 +280,9 @@ AppleATDecoder::DecodeSample(MediaRawData* aSample) } while (true); if (outputData.IsEmpty()) { + // We aren't going to output anything, inform the reader that we need more + // data. + mCallback->InputExhausted(); return NS_OK; }