Bug 1121661 - Null check mDemuxer in MP4Reader::ResetDecoder since we might not have created one yet. r=bholley
authorMatt Woodrow <mwoodrow@mozilla.com>
Thu, 15 Jan 2015 14:42:49 +1300
changeset 251041 674ba4e9ed2567747812381c51614c6d8a09a939
parent 251040 a9355863e299c89f420f2794395ccc5a63709101
child 251042 74abc1cf01936a7b860960e43a2b25d463f36ed8
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1121661
milestone38.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1121661 - Null check mDemuxer in MP4Reader::ResetDecoder since we might not have created one yet. r=bholley
dom/media/fmp4/MP4Reader.cpp
--- a/dom/media/fmp4/MP4Reader.cpp
+++ b/dom/media/fmp4/MP4Reader.cpp
@@ -735,22 +735,26 @@ MP4Reader::SizeOfQueue(TrackType aTrack)
 
 nsresult
 MP4Reader::ResetDecode()
 {
   MOZ_ASSERT(GetTaskQueue()->IsCurrentThreadIn());
   Flush(kVideo);
   {
     MonitorAutoLock mon(mDemuxerMonitor);
-    mDemuxer->SeekVideo(0);
+    if (mDemuxer) {
+      mDemuxer->SeekVideo(0);
+    }
   }
   Flush(kAudio);
   {
     MonitorAutoLock mon(mDemuxerMonitor);
-    mDemuxer->SeekAudio(0);
+    if (mDemuxer) {
+      mDemuxer->SeekAudio(0);
+    }
   }
   return MediaDecoderReader::ResetDecode();
 }
 
 void
 MP4Reader::Output(TrackType aTrack, MediaData* aSample)
 {
 #ifdef LOG_SAMPLE_DECODE