Bug 1121661 - Null check mDemuxer in MP4Reader::ResetDecoder since we might not have created one yet. r=bholley, a=sledru
authorMatt Woodrow <mwoodrow@mozilla.com>
Thu, 15 Jan 2015 14:42:49 +1300
changeset 242884 28900712c87f
parent 242883 53ae5eeb6147
child 242885 c8031be76a86
push id4328
push userryanvm@gmail.com
push date2015-01-15 22:26 +0000
treeherdermozilla-beta@c8031be76a86 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley, sledru
bugs1121661
milestone36.0
Bug 1121661 - Null check mDemuxer in MP4Reader::ResetDecoder since we might not have created one yet. r=bholley, a=sledru
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