File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -2703,7 +2703,7 @@ namespace Mist{
27032703 uint64_t now = thisBootMs / 1000 ;
27042704 if (now <= lastStats && !force){return ;}
27052705
2706- if (isRecording () && DTSC::trackValidMask != TRACK_VALID_INT_PROCESS ) {
2706+ if (isRecording ()) {
27072707 if (lastPushUpdate + 5 <= now){
27082708 JSON::Value pStat;
27092709 pStat[" push_status_update" ][" id" ] = getpid ();
Original file line number Diff line number Diff line change @@ -97,7 +97,11 @@ int generateChildAddressInRange(Socket::Address & newLocalAddrStr) {
9797}
9898#endif
9999
100- namespace Mist {
100+ namespace Mist {
101+ bool OutTSSRT::isRecording () {
102+ return !getenv (" IS_PROTOCOL_PORT" ) && config->getString (" target" ).size ();
103+ }
104+
101105 OutTSSRT::OutTSSRT (Socket::Connection &conn, Socket::SRTConnection * _srtSock) : TSOutput(conn){
102106 closeMyConn ();
103107 srtConn = _srtSock;
@@ -780,6 +784,7 @@ namespace Mist{
780784 conf.getOption (" port" , true ).append ((uint64_t )tgt.getPort ());
781785 conf.getOption (" target" , true ).append (" " );
782786 }else {
787+ setenv (" IS_PROTOCOL_PORT" , " 1" , 1 );
783788 HTTP::parseVars (conf.getString (" sockopts" ), arguments);
784789 std::string opt = conf.getString (" passphrase" );
785790 if (opt.size ()){arguments[" passphrase" ] = opt;}
@@ -896,5 +901,4 @@ namespace Mist{
896901 if (conf.is_restarting ) { stashProxyList (udpSrv, proxyConnections); }
897902#endif
898903 }
899- }// namespace Mist
900-
904+ } // namespace Mist
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ namespace Mist{
2424 virtual std::string getConnectedBinHost (){return srtConn?srtConn->getBinHost ():" " ;}
2525 virtual bool dropPushTrack (uint32_t trackId, const std::string & dropReason);
2626 private:
27+ virtual bool isRecording ();
2728 HTTP::URL target;
2829 int64_t timeStampOffset;
2930 uint64_t lastTimeStamp;
You can’t perform that action at this time.
0 commit comments