[Pkg-voip-commits] [janus] 158/282: Make sure codecs match when switching publishers in a VideoRoom
Jonas Smedegaard
dr at jones.dk
Wed Dec 20 21:53:37 UTC 2017
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag debian/0.2.6-1
in repository janus.
commit 79b2b801b58069d1dbea64136428ffda035f675d
Author: Lorenzo Miniero <lminiero at gmail.com>
Date: Fri Oct 27 13:16:55 2017 +0200
Make sure codecs match when switching publishers in a VideoRoom
---
plugins/janus_videoroom.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/plugins/janus_videoroom.c b/plugins/janus_videoroom.c
index 97dd89b..e1fe958 100644
--- a/plugins/janus_videoroom.c
+++ b/plugins/janus_videoroom.c
@@ -4196,6 +4196,15 @@ static void *janus_videoroom_handler(void *data) {
/* Unsubscribe from the previous publisher */
janus_videoroom_participant *prev_feed = listener->feed;
if(prev_feed) {
+ /* ... but make sure the codecs are compliant first */
+ if(publisher->acodec != prev_feed->acodec || publisher->vcodec != prev_feed->vcodec) {
+ listener->paused = paused;
+ JANUS_LOG(LOG_ERR, "The two publishers are not using the same codecs, can't switch\n");
+ error_code = JANUS_VIDEOROOM_ERROR_INVALID_SDP;
+ g_snprintf(error_cause, 512, "The two publishers are not using the same codecs, can't switch");
+ goto error;
+ }
+ /* Go on */
janus_mutex_lock(&prev_feed->listeners_mutex);
prev_feed->listeners = g_slist_remove(prev_feed->listeners, listener);
janus_mutex_unlock(&prev_feed->listeners_mutex);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/janus.git
More information about the Pkg-voip-commits
mailing list