Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash when calling enableFallback/Slideshow below min layer #1772

Merged
merged 4 commits into from
Nov 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions erizo/src/erizo/MediaStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,9 @@ void MediaStream::setQualityLayer(int spatial_layer, int temporal_layer) {

void MediaStream::enableSlideShowBelowSpatialLayer(bool enabled, int spatial_layer) {
asyncTask([enabled, spatial_layer] (std::shared_ptr<MediaStream> media_stream) {
media_stream->quality_manager_->enableSlideShowBelowSpatialLayer(enabled, spatial_layer);
if (media_stream->isRunning()) {
media_stream->quality_manager_->enableSlideShowBelowSpatialLayer(enabled, spatial_layer);
}
});
}

Expand All @@ -1104,7 +1106,9 @@ void MediaStream::addHandlerInPosition(Positions position,

void MediaStream::enableFallbackBelowMinLayer(bool enabled) {
asyncTask([enabled] (std::shared_ptr<MediaStream> media_stream) {
media_stream->quality_manager_->enableFallbackBelowMinLayer(enabled);
if (media_stream->isRunning()) {
media_stream->quality_manager_->enableFallbackBelowMinLayer(enabled);
}
});
}

Expand Down