Bug 1129732: Part2. Fix VideoData copy. r=cpearce a=lmandel
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 09 Feb 2015 23:29:00 +1100
changeset 249922 5c82e7305fb0bfaa4b005e4fb811a13edc93ce00
parent 249921 313cbd7c7c0e15ff731d36fe3e73f10c166c8001
child 249923 1c5814ce8adee2321d85b02885abdf51f7965683
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce, lmandel
bugs1129732
milestone37.0a2
Bug 1129732: Part2. Fix VideoData copy. r=cpearce a=lmandel 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,