Bug 1258922: [MSE] P1. Initialise variable. r=gerald a=ritu
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 05 May 2016 14:57:47 +1000
changeset 332787 02a2242a2a77850c6e256a02dde628b72a22f353
parent 332786 cd7dd2a236ca6295e3699aad8adf1b45387ac1f8
child 332788 6ea323c87eb7f73e73ae374eb99a461723bc1323
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald, ritu
bugs1258922
milestone48.0a2
Bug 1258922: [MSE] P1. Initialise variable. r=gerald a=ritu It was possible for the variable to be used uninitialized. MozReview-Commit-ID: EwzyJRPn7iV
dom/media/mediasource/TrackBuffersManager.cpp
--- a/dom/media/mediasource/TrackBuffersManager.cpp
+++ b/dom/media/mediasource/TrackBuffersManager.cpp
@@ -1953,16 +1953,17 @@ uint32_t
 TrackBuffersManager::SkipToNextRandomAccessPoint(TrackInfo::TrackType aTrack,
                                                  const TimeUnit& aTimeThreadshold,
                                                  bool& aFound)
 {
   MOZ_ASSERT(OnTaskQueue());
   uint32_t parsed = 0;
   auto& trackData = GetTracksData(aTrack);
   const TrackBuffer& track = GetTrackBuffer(aTrack);
+  aFound = false;
 
   uint32_t nextSampleIndex = trackData.mNextGetSampleIndex.valueOr(0);
   for (uint32_t i = nextSampleIndex; i < track.Length(); i++) {
     const RefPtr<MediaRawData>& sample = track[i];
     if (sample->mKeyframe &&
         sample->mTime >= aTimeThreadshold.ToMicroseconds()) {
       trackData.mNextSampleTimecode =
         TimeUnit::FromMicroseconds(sample->mTimecode);