Bug 1129732: Part2. Fix VideoData copy. r=cpearce
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 09 Feb 2015 23:29:00 +1100
changeset 228146 a190ece892cc72a7c08488df1c3b68ab952bbad6
parent 228145 3068d82cb1a8f8ce7ee52b2b9ed97c41d39a9a1f
child 228147 7f2c7fe988991003fe0f1162fa55753e34a471a4
push id28258
push userryanvm@gmail.com
push dateMon, 09 Feb 2015 21:30:07 +0000
treeherdermozilla-central@2cb22c058add [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1129732
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 1129732: Part2. Fix VideoData copy. r=cpearce mDiscontinuity member must be copied.
dom/media/MediaData.cpp
--- a/dom/media/MediaData.cpp
+++ b/dom/media/MediaData.cpp
@@ -153,32 +153,34 @@ VideoData::ShallowCopyUpdateDuration(Vid
                                      int64_t aDuration)
 {
   nsRefPtr<VideoData> v = new VideoData(aOther->mOffset,
                                         aOther->mTime,
                                         aDuration,
                                         aOther->mKeyframe,
                                         aOther->mTimecode,
                                         aOther->mDisplay);
+  v->mDiscontinuity = aOther->mDiscontinuity;
   v->mImage = aOther->mImage;
   return v.forget();
 }
 
 /* static */
 already_AddRefed<VideoData>
 VideoData::ShallowCopyUpdateTimestamp(VideoData* aOther,
                                       int64_t aTimestamp)
 {
   NS_ENSURE_TRUE(aOther, nullptr);
   nsRefPtr<VideoData> v = new VideoData(aOther->mOffset,
                                         aTimestamp,
                                         aOther->GetEndTime() - aTimestamp,
                                         aOther->mKeyframe,
                                         aOther->mTimecode,
                                         aOther->mDisplay);
+  v->mDiscontinuity = aOther->mDiscontinuity;
   v->mImage = aOther->mImage;
   return v.forget();
 }
 
 /* static */
 already_AddRefed<VideoData>
 VideoData::ShallowCopyUpdateTimestampAndDuration(VideoData* aOther,
                                                  int64_t aTimestamp,
@@ -186,16 +188,17 @@ VideoData::ShallowCopyUpdateTimestampAnd
 {
   NS_ENSURE_TRUE(aOther, nullptr);
   nsRefPtr<VideoData> v = new VideoData(aOther->mOffset,
                                         aTimestamp,
                                         aDuration,
                                         aOther->mKeyframe,
                                         aOther->mTimecode,
                                         aOther->mDisplay);
+  v->mDiscontinuity = aOther->mDiscontinuity;
   v->mImage = aOther->mImage;
   return v.forget();
 }
 
 /* static */
 void VideoData::SetVideoDataToImage(PlanarYCbCrImage* aVideoImage,
                                     VideoInfo& aInfo,
                                     const YCbCrBuffer &aBuffer,