diff --git a/dom/media/MediaManager.cpp b/dom/media/MediaManager.cpp index 014536fb59b4..aa8e9d9dad62 100644 --- a/dom/media/MediaManager.cpp +++ b/dom/media/MediaManager.cpp @@ -2294,9 +2294,10 @@ static void ReduceConstraint( mediaSource = Some(aConstraint.GetAsMediaTrackConstraints().mMediaSource.Value()); } + aConstraint.Uninit(); if (mediaSource) { - aConstraint.SetAsMediaTrackConstraints().mMediaSource.Value() = - *mediaSource; + aConstraint.SetAsMediaTrackConstraints().mMediaSource.Construct( + *mediaSource); } else { aConstraint.SetAsMediaTrackConstraints(); }