Bug 1195071: Check for MediaDataDecoder::Input error. r=cpearce a=ritu
authorJean-Yves Avenard <jyavenard@mozilla.com>
Sun, 16 Aug 2015 11:18:11 +1000
changeset 289100 a9d79eb7e02a26455ac844870fd0128c3446d922
parent 289099 a5843169a5497397091a719e0d70eb3d126f0572
child 289101 ded123bdb871df84d09b3917cc4ccb1b2fc44e85
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce, ritu
bugs1195071
milestone42.0a2
Bug 1195071: Check for MediaDataDecoder::Input error. r=cpearce a=ritu
dom/media/MediaFormatReader.cpp
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -971,17 +971,21 @@ MediaFormatReader::DecodeDemuxedSamples(
     LOGV("Input:%lld (dts:%lld kf:%d)",
          sample->mTime, sample->mTimecode, sample->mKeyframe);
     decoder.mOutputRequested = true;
     decoder.mNumSamplesInput++;
     decoder.mSizeOfQueue++;
     if (aTrack == TrackInfo::kVideoTrack) {
       aA.mParsed++;
     }
-    decoder.mDecoder->Input(sample);
+    if (NS_FAILED(decoder.mDecoder->Input(sample))) {
+      LOG("Unable to pass frame to decoder");
+      NotifyError(aTrack);
+      return;
+    }
     decoder.mQueuedSamples.RemoveElementAt(0);
     samplesPending = true;
   }
 
   // We have serviced the decoder's request for more data.
   decoder.mInputExhausted = false;
 }