Bug 1195073: [webm] P3. Initialize members. r=kinetik a=ritu
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 19 Aug 2015 15:24:12 +1000
changeset 289182 9958c6b9b6528c33875d89e345a308caf5bdf06e
parent 289181 827657870264477092d7d259511a32649933a261
child 289183 2496e584f472e9bebaeaac1d361568f0d8765593
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik, ritu
bugs1195073
milestone42.0a2
Bug 1195073: [webm] P3. Initialize members. r=kinetik a=ritu
dom/media/webm/WebMDemuxer.cpp
--- a/dom/media/webm/WebMDemuxer.cpp
+++ b/dom/media/webm/WebMDemuxer.cpp
@@ -117,16 +117,17 @@ static void webmdemux_log(nestegg* aCont
 WebMDemuxer::WebMDemuxer(MediaResource* aResource)
   : mResource(aResource)
   , mBufferedState(nullptr)
   , mInitData(nullptr)
   , mContext(nullptr)
   , mVideoTrack(0)
   , mAudioTrack(0)
   , mSeekPreroll(0)
+  , mLastAudioFrameTime(0)
   , mLastVideoFrameTime(0)
   , mAudioCodec(-1)
   , mVideoCodec(-1)
   , mHasVideo(false)
   , mHasAudio(false)
   , mNeedReIndex(true)
 {
   if (!gNesteggLog) {
@@ -684,16 +685,20 @@ WebMDemuxer::SeekInternal(const media::T
 
     r = nestegg_offset_seek(mContext, offset);
     if (r == -1) {
       WEBM_DEBUG("and nestegg_offset_seek to %" PRIu64 " failed", offset);
       return NS_ERROR_FAILURE;
     }
     WEBM_DEBUG("got offset from buffered state: %" PRIu64 "", offset);
   }
+
+  mLastAudioFrameTime = 0;
+  mLastVideoFrameTime = 0;
+
   return NS_OK;
 }
 
 media::TimeIntervals
 WebMDemuxer::GetBuffered()
 {
   EnsureUpToDateIndex();
   AutoPinned<MediaResource> resource(mResource.GetResource());