Bug 774084 - Fix a crash in nsBuiltinDecoder::GetSeekable. r=kinetik a=lsblakk
authorPaul Adenot <paul@paul.cx>
Sun, 15 Jul 2012 10:57:41 -0700
changeset 100481 19ad43a4a27b4deb009eecf1e6a1e33c199107ec
parent 100480 3ee4b5b63f6811f5fd7a189cdcb31feb1dae42eb
child 100482 bd0b4c2ac18e557637e2a0a03c4eb0f9b51121d1
push id1263
push usermgregan@mozilla.com
push dateMon, 13 Aug 2012 00:18:53 +0000
treeherdermozilla-beta@19ad43a4a27b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik, lsblakk
bugs774084
milestone15.0
Bug 774084 - Fix a crash in nsBuiltinDecoder::GetSeekable. r=kinetik a=lsblakk
content/media/nsBuiltinDecoder.cpp
--- a/content/media/nsBuiltinDecoder.cpp
+++ b/content/media/nsBuiltinDecoder.cpp
@@ -951,17 +951,17 @@ nsresult nsBuiltinDecoder::GetSeekable(n
 
   if (IsSeekable()) {
     double end = IsInfinite() ? std::numeric_limits<double>::infinity()
                               : initialTime + GetDuration();
     aSeekable->Add(initialTime, end);
     return NS_OK;
   }
 
-  if (mDecoderStateMachine->IsSeekableInBufferedRanges()) {
+  if (mDecoderStateMachine && mDecoderStateMachine->IsSeekableInBufferedRanges()) {
     return GetBuffered(aSeekable);
   } else {
     // The stream is not seekable using only buffered ranges, and is not
     // seekable. Don't allow seeking (return no ranges in |seekable|).
     return NS_OK;
   }
 }