diff --git a/erizo/src/erizo/media/ExternalInput.cpp b/erizo/src/erizo/media/ExternalInput.cpp index 673377eda..52785f45c 100644 --- a/erizo/src/erizo/media/ExternalInput.cpp +++ b/erizo/src/erizo/media/ExternalInput.cpp @@ -109,6 +109,7 @@ int ExternalInput::init() { decodedBuffer_.reset((unsigned char*) malloc(100000)); MediaInfo om; om.processorType = PACKAGE_ONLY; + om.rtpVideoInfo.PT = VP8_90000_PT; if (audio_st) { if (audio_st->codec->codec_id == AV_CODEC_ID_PCM_MULAW) { ELOG_DEBUG("PCM U8"); @@ -134,6 +135,7 @@ int ExternalInput::init() { om.processorType = RTP_ONLY; om.videoCodec.codec = VIDEO_CODEC_VP8; + om.rtpVideoInfo.PT = VP8_90000_PT; om.videoCodec.bitRate = 1000000; om.videoCodec.width = st->codec->width; om.videoCodec.height = st->codec->height; diff --git a/erizo/src/erizo/media/MediaProcessor.cpp b/erizo/src/erizo/media/MediaProcessor.cpp index ebd719a49..c822626d9 100644 --- a/erizo/src/erizo/media/MediaProcessor.cpp +++ b/erizo/src/erizo/media/MediaProcessor.cpp @@ -483,7 +483,7 @@ int OutputProcessor::packageAudio(unsigned char* inBuff, int inBuffLen, unsigned int OutputProcessor::packageVideo(unsigned char* inBuff, int buffSize, unsigned char* outBuff, long int pts) { // NOLINT if (videoPackager == 0) { - ELOG_DEBUG("No se ha inicailizado el codec de output vídeo RTP"); + ELOG_DEBUG("No se ha inicializado el codec de output vídeo RTP"); return -1; } @@ -509,7 +509,7 @@ int OutputProcessor::packageVideo(unsigned char* inBuff, int buffSize, unsigned rtpHeader.setTimestamp(av_rescale(pts, 90000, 1000)); } rtpHeader.setSSRC(55543); - rtpHeader.setPayloadType(96); + rtpHeader.setPayloadType(mediaInfo.rtpVideoInfo.PT); memcpy(rtpBuffer_, &rtpHeader, rtpHeader.getHeaderLength()); memcpy(&rtpBuffer_[rtpHeader.getHeaderLength()], outBuff, outlen); diff --git a/erizo_controller/erizoJS/models/Publisher.js b/erizo_controller/erizoJS/models/Publisher.js index ed4418926..4f5d18fc8 100644 --- a/erizo_controller/erizoJS/models/Publisher.js +++ b/erizo_controller/erizoJS/models/Publisher.js @@ -226,7 +226,7 @@ class Source extends NodeClass { if (this.ei && this.mediaStream.periodicPlis) { clearInterval(this.mediaStream.periodicPlis); this.mediaStream.periodicPlis = undefined; - } else { + } else if (this.mediaStream.setPeriodicKeyframeRequests) { this.mediaStream.setPeriodicKeyframeRequests(false); } } diff --git a/erizo_controller/erizoJS/models/Subscriber.js b/erizo_controller/erizoJS/models/Subscriber.js index c8d537c42..8c4c495f4 100644 --- a/erizo_controller/erizoJS/models/Subscriber.js +++ b/erizo_controller/erizoJS/models/Subscriber.js @@ -51,9 +51,14 @@ class Subscriber extends NodeClass { Math.min(this.publisher.getMaxVideoBW(), this.maxVideoBW) : this.maxVideoBW; this.maxVideoBW = updatedMaxVideoBW; } else { - updatedMaxVideoBW = this.publisher.getMaxVideoBW(); + // eslint-disable-next-line no-lonely-if + if (this.publisher.getMaxVideoBW) { + updatedMaxVideoBW = this.publisher.getMaxVideoBW(); + } else { + updatedMaxVideoBW = 4000000; + } } - log.debug(`Setting maxVideoBW in subscriber, requested: ${maxVideoBW}, publisher ${this.publisher.getMaxVideoBW()}, result:${updatedMaxVideoBW}`); + log.debug(`Setting maxVideoBW in subscriber, requested: ${maxVideoBW}, publisher ${this.publisher.getMaxVideoBW ? this.publisher.getMaxVideoBW() : 'No max video BW'}, result:${updatedMaxVideoBW}`); this.mediaStream.setMaxVideoBW(updatedMaxVideoBW); }