Bug 1154896: Report decoding errors back to MP4Reader. r=rillian a=lizzard
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 06 May 2015 09:58:09 +1000
changeset 265923 868aa45df9664b374c51c14335d7e51b0b570b38
parent 265922 b9270d8363550915ae5f6a7830128859e0ebe50f
child 265924 e4bdd73813c8ff5b8df56910301b312b9a299b80
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrillian, lizzard
bugs1154896
milestone39.0a2
Bug 1154896: Report decoding errors back to MP4Reader. r=rillian a=lizzard
dom/media/fmp4/apple/AppleVDADecoder.cpp
dom/media/fmp4/apple/AppleVTDecoder.cpp
--- a/dom/media/fmp4/apple/AppleVDADecoder.cpp
+++ b/dom/media/fmp4/apple/AppleVDADecoder.cpp
@@ -355,16 +355,17 @@ AppleVDADecoder::SubmitFrame(mp4_demuxer
 
   OSStatus rv = VDADecoderDecode(mDecoder,
                                  0,
                                  block,
                                  frameInfo);
 
   if (rv != noErr) {
     NS_WARNING("AppleVDADecoder: Couldn't pass frame to decoder");
+    mCallback->Error();
     return NS_ERROR_FAILURE;
   }
 
   if (mIs106) {
     // TN2267:
     // frameInfo: A CFDictionaryRef containing information to be returned in
     // the output callback for this frame.
     // This dictionary can contain client provided information associated with
--- a/dom/media/fmp4/apple/AppleVTDecoder.cpp
+++ b/dom/media/fmp4/apple/AppleVTDecoder.cpp
@@ -241,17 +241,19 @@ AppleVTDecoder::SubmitFrame(mp4_demuxer:
   VTDecodeFrameFlags decodeFlags =
     kVTDecodeFrame_EnableAsynchronousDecompression;
   rv = VTDecompressionSessionDecodeFrame(mSession,
                                          sample,
                                          decodeFlags,
                                          CreateAppleFrameRef(aSample),
                                          &infoFlags);
   if (rv != noErr && !(infoFlags & kVTDecodeInfo_FrameDropped)) {
+    LOG("AppleVTDecoder: Error %d VTDecompressionSessionDecodeFrame", rv);
     NS_WARNING("Couldn't pass frame to decoder");
+    mCallback->Error();
     return NS_ERROR_FAILURE;
   }
 
   // Ask for more data.
   if (mTaskQueue->IsEmpty()) {
     LOG("AppleVTDecoder task queue empty; requesting more data");
     mCallback->InputExhausted();
   }