diff --git a/src/conference/session/video-stream.cpp b/src/conference/session/video-stream.cpp index 4faa9591731304a0756569797c61618548ec11e7..934cc0300b630f65450a4365442142af7cca521e 100644 --- a/src/conference/session/video-stream.cpp +++ b/src/conference/session/video-stream.cpp @@ -326,17 +326,20 @@ void MS2VideoStream::render(const OfferAnswerContext & ctx, CallSession::State t mStream->staticimage_webcam_fps_optimization = false; LinphoneVideoDefinition *max_vdef = nullptr; - if (this->getMediaSessionPrivate().getParams()->getConferenceVideoLayout() == ConferenceLayout::Grid) { - const char *str = linphone_config_get_string(linphone_core_get_config(getCCore()), "video", "max_mosaic_size", nullptr); - if (str != NULL && str[0] != 0) { - max_vdef = linphone_factory_find_supported_video_definition_by_name(linphone_factory_get(), str); - if (max_vdef == NULL) { - lError() << "Cannot set max video size in mosaic (video definition '" << str << "' not supported)"; - } else { - MSVideoSize max; - max.width = static_cast<int>(linphone_video_definition_get_width(max_vdef)); - max.height = static_cast<int>(linphone_video_definition_get_height(max_vdef)); - video_stream_set_sent_video_size_max(mStream, max); + if (listener) { + const auto conference = listener->getCallSessionConference(getMediaSession().getSharedFromThis()); + if (conference) { + const char *str = linphone_config_get_string(linphone_core_get_config(getCCore()), "video", "max_conference_size", nullptr); + if (str != NULL && str[0] != 0) { + max_vdef = linphone_factory_find_supported_video_definition_by_name(linphone_factory_get(), str); + if (max_vdef == NULL) { + lError() << "Cannot set max video size in mosaic (video definition '" << str << "' not supported)"; + } else { + MSVideoSize max; + max.width = static_cast<int>(linphone_video_definition_get_width(max_vdef)); + max.height = static_cast<int>(linphone_video_definition_get_height(max_vdef)); + video_stream_set_sent_video_size_max(mStream, max); + } } } } diff --git a/tester/local_conference_tester.cpp b/tester/local_conference_tester.cpp index b386dff44c95bdb4ed286897c8bbd64f1001f006..0e20aeef30285d5f50325277d0575e8d98960ab8 100644 --- a/tester/local_conference_tester.cpp +++ b/tester/local_conference_tester.cpp @@ -3381,7 +3381,7 @@ static void create_conference_base (time_t start_time, int duration, bool_t unin if (layout == LinphoneConferenceLayoutGrid) { linphone_core_set_preferred_video_definition_by_name(mgr->lc, "720p"); - linphone_config_set_string(linphone_core_get_config(mgr->lc), "video", "max_mosaic_size", "vga"); + linphone_config_set_string(linphone_core_get_config(mgr->lc), "video", "max_conference_size", "vga"); } }