rebroadcast: fix potential bug where there is settings update spam

This commit is contained in:
Koushik Dutta
2022-03-27 17:08:49 -07:00
parent de4bbe3b42
commit 49134f7e32
3 changed files with 4 additions and 5 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/prebuffer-mixin",
"version": "0.1.213",
"version": "0.1.214",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/prebuffer-mixin",
"version": "0.1.213",
"version": "0.1.214",
"license": "Apache-2.0",
"dependencies": {
"@scrypted/common": "file:../../common",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/prebuffer-mixin",
"version": "0.1.213",
"version": "0.1.214",
"description": "Rebroadcast and Prebuffer for VideoCameras.",
"author": "Scrypted",
"license": "Apache-2.0",

View File

@@ -18,7 +18,6 @@ import { addTrackControls } from '@scrypted/common/src/sdp-utils';
import { connectRFC4571Parser, startRFC4571Parser } from './rfc4571';
import { sleep } from '@scrypted/common/src/sleep';
import crypto from 'crypto';
import { title } from 'process';
const { mediaManager, log, systemManager, deviceManager } = sdk;
@@ -765,7 +764,7 @@ class PrebufferSession {
const updateIdr = () => {
if (this.prevIdr) {
const sendEvent = !this.detectedIdrInterval;
const sendEvent = typeof this.detectedIdrInterval !== 'number';
this.detectedIdrInterval = now - this.prevIdr;
// only on the first idr update should we send a settings refresh.
if (sendEvent)