diff options
Diffstat (limited to 'dom/media/MediaInfo.h')
-rw-r--r-- | dom/media/MediaInfo.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/dom/media/MediaInfo.h b/dom/media/MediaInfo.h index 7ab5df4e0a..00f322bac7 100644 --- a/dom/media/MediaInfo.h +++ b/dom/media/MediaInfo.h @@ -349,7 +349,32 @@ class VideoInfo : public TrackInfo { mExtraData(new MediaByteBuffer), mRotation(VideoRotation::kDegree_0) {} - VideoInfo(const VideoInfo& aOther) = default; + VideoInfo(const VideoInfo& aOther) : TrackInfo(aOther) { + if (aOther.mCodecSpecificConfig) { + mCodecSpecificConfig = new MediaByteBuffer(); + mCodecSpecificConfig->AppendElements( + reinterpret_cast<uint8_t*>(aOther.mCodecSpecificConfig->Elements()), + aOther.mCodecSpecificConfig->Length()); + } + if (aOther.mExtraData) { + mExtraData = new MediaByteBuffer(); + mExtraData->AppendElements( + reinterpret_cast<uint8_t*>(aOther.mExtraData->Elements()), + aOther.mExtraData->Length()); + } + mDisplay = aOther.mDisplay; + mStereoMode = aOther.mStereoMode; + mImage = aOther.mImage; + mRotation = aOther.mRotation; + mColorDepth = aOther.mColorDepth; + mColorSpace = aOther.mColorSpace; + mColorPrimaries = aOther.mColorPrimaries; + mTransferFunction = aOther.mTransferFunction; + mColorRange = aOther.mColorRange; + mImageRect = aOther.mImageRect; + mAlphaPresent = aOther.mAlphaPresent; + mFrameRate = aOther.mFrameRate; + }; bool operator==(const VideoInfo& rhs) const; |