summaryrefslogtreecommitdiffstats
path: root/dom/media/webrtc/libwebrtcglue/VideoStreamFactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/media/webrtc/libwebrtcglue/VideoStreamFactory.cpp')
-rw-r--r--dom/media/webrtc/libwebrtcglue/VideoStreamFactory.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/dom/media/webrtc/libwebrtcglue/VideoStreamFactory.cpp b/dom/media/webrtc/libwebrtcglue/VideoStreamFactory.cpp
index 0ead26a453..d3047f4fca 100644
--- a/dom/media/webrtc/libwebrtcglue/VideoStreamFactory.cpp
+++ b/dom/media/webrtc/libwebrtcglue/VideoStreamFactory.cpp
@@ -150,6 +150,7 @@ std::vector<webrtc::VideoStream> VideoStreamFactory::CreateEncoderStreams(
: aConfig.number_of_streams;
MOZ_RELEASE_ASSERT(streamCount >= 1, "Should request at least one stream");
+ MOZ_RELEASE_ASSERT(streamCount <= aConfig.simulcast_layers.size());
std::vector<webrtc::VideoStream> streams;
streams.reserve(streamCount);
@@ -160,10 +161,10 @@ std::vector<webrtc::VideoStream> VideoStreamFactory::CreateEncoderStreams(
}
for (size_t idx = 0; idx < streamCount; ++idx) {
- webrtc::VideoStream video_stream;
+ webrtc::VideoStream video_stream = aConfig.simulcast_layers[idx];
auto& encoding = mCodecConfig.mEncodings[idx];
- video_stream.active = encoding.active;
MOZ_ASSERT(encoding.constraints.scaleDownBy >= 1.0);
+ MOZ_ASSERT(video_stream.active == encoding.active);
gfx::IntSize newSize(0, 0);