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 232184 e2ca4b9c3d70cd9dbfb0934d0ed81ae5fb05672b
parent 232183 43f706afb3ff5b40bae202a8628c84b150a7cfd1
child 232185 ba32d47355264672b6a99fd4ee6dac32fcfdf43a
push id19
push userryanvm@gmail.com
push dateFri, 16 Jan 2015 19:06:34 +0000
treeherdermozilla-b2g37_v2_2@4ac73262c07e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley, sledru
bugs1121661
milestone37.0a2
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