[Pkg-voip-commits] [janus] 111/163: Fixed leak in Record&Play, and dead code in VideoRoom
Jonas Smedegaard
dr at jones.dk
Sat Oct 28 01:22:20 UTC 2017
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag debian/0.2.5-1
in repository janus.
commit 6b89cea46e20367121041af29c6d146d29de338c
Author: Lorenzo Miniero <lminiero at gmail.com>
Date: Tue Sep 12 14:32:28 2017 +0200
Fixed leak in Record&Play, and dead code in VideoRoom
---
plugins/janus_recordplay.c | 2 ++
plugins/janus_videoroom.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/plugins/janus_recordplay.c b/plugins/janus_recordplay.c
index de9486c..c6a90fb 100644
--- a/plugins/janus_recordplay.c
+++ b/plugins/janus_recordplay.c
@@ -486,9 +486,11 @@ static const char *janus_recordplay_parse_codec(const char *dir, const char *fil
bytes = fread(prebuffer, sizeof(char), 5, file);
if(prebuffer[0] == 'v') {
JANUS_LOG(LOG_VERB, "This is an old video recording, assuming VP8\n");
+ fclose(file);
return preferred_video_codecs[0];
} else if(prebuffer[0] == 'a') {
JANUS_LOG(LOG_VERB, "This is an old audio recording, assuming Opus\n");
+ fclose(file);
return preferred_audio_codecs[0];
}
}
diff --git a/plugins/janus_videoroom.c b/plugins/janus_videoroom.c
index 061b796..1bc6953 100644
--- a/plugins/janus_videoroom.c
+++ b/plugins/janus_videoroom.c
@@ -2624,7 +2624,7 @@ void janus_videoroom_incoming_rtp(janus_plugin_session *handle, int video, char
if((!video && participant->audio_active) || (video && participant->video_active)) {
rtp_header *rtp = (rtp_header *)buf;
uint32_t ssrc = ntohl(rtp->ssrc);
- int sc = 0;
+ int sc = -1;
/* Check if we're simulcasting, and if so, keep track of the "layer" */
if(video && participant->ssrc[0] != 0) {
if(ssrc == participant->ssrc[0])
@@ -2653,7 +2653,7 @@ void janus_videoroom_incoming_rtp(janus_plugin_session *handle, int video, char
rtp->type = rtp_forward->payload_type;
if(rtp_forward->ssrc > 0)
rtp->ssrc = htonl(rtp_forward->ssrc);
- if(video && rtp_forward->is_video && rtp_forward->substream == sc) {
+ if(video && rtp_forward->is_video && (sc == -1 || rtp_forward->substream == sc)) {
if(sendto(participant->udp_sock, buf, len, 0, (struct sockaddr*)&rtp_forward->serv_addr, sizeof(rtp_forward->serv_addr)) < 0) {
JANUS_LOG(LOG_HUGE, "Error forwarding RTP video packet for %s... %s (len=%d)...\n",
participant->display, strerror(errno), len);
--
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