Fix RTMP outgoing push timestamps

This commit is contained in:
Thulinma 2024-06-01 14:46:47 +02:00
parent a1737cdf8b
commit e712527d42
2 changed files with 1 additions and 11 deletions

View file

@ -30,7 +30,6 @@ namespace Mist{
customAudioIterator = 0;
currentFrameTimestamp = 0;
lastAck = Util::bootSecs();
lastOutTime = 0;
setRtmpOffset = false;
rtmpOffset = 0;
authAttempts = 0;
@ -566,15 +565,6 @@ namespace Mist{
if (liveSeek()){return;}
}
if (streamOut.size()){
if (thisPacket.getTime() - rtmpOffset < lastOutTime){
int64_t OLD = rtmpOffset;
rtmpOffset -= (1 + lastOutTime - (thisPacket.getTime() - rtmpOffset));
INFO_MSG("Changing rtmpOffset from %" PRId64 " to %" PRId64, OLD, rtmpOffset);
realTime = 800;
}
lastOutTime = thisPacket.getTime() - rtmpOffset;
}
uint64_t timestamp = thisPacket.getTime() - rtmpOffset;
// make sure we don't go negative
if (rtmpOffset > (int64_t)thisPacket.getTime()){

View file

@ -24,7 +24,7 @@ namespace Mist{
std::string streamOut; ///< When pushing out, the output stream name
bool setRtmpOffset;
int64_t rtmpOffset;
uint64_t lastOutTime;
uint64_t lastSend;
uint32_t maxbps;
std::string app_name;
void parseChunk(Socket::Buffer &inputBuffer);