Fix RTMP outgoing push timestamps
This commit is contained in:
parent
a1737cdf8b
commit
e712527d42
2 changed files with 1 additions and 11 deletions
|
@ -30,7 +30,6 @@ namespace Mist{
|
||||||
customAudioIterator = 0;
|
customAudioIterator = 0;
|
||||||
currentFrameTimestamp = 0;
|
currentFrameTimestamp = 0;
|
||||||
lastAck = Util::bootSecs();
|
lastAck = Util::bootSecs();
|
||||||
lastOutTime = 0;
|
|
||||||
setRtmpOffset = false;
|
setRtmpOffset = false;
|
||||||
rtmpOffset = 0;
|
rtmpOffset = 0;
|
||||||
authAttempts = 0;
|
authAttempts = 0;
|
||||||
|
@ -566,15 +565,6 @@ namespace Mist{
|
||||||
if (liveSeek()){return;}
|
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;
|
uint64_t timestamp = thisPacket.getTime() - rtmpOffset;
|
||||||
// make sure we don't go negative
|
// make sure we don't go negative
|
||||||
if (rtmpOffset > (int64_t)thisPacket.getTime()){
|
if (rtmpOffset > (int64_t)thisPacket.getTime()){
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace Mist{
|
||||||
std::string streamOut; ///< When pushing out, the output stream name
|
std::string streamOut; ///< When pushing out, the output stream name
|
||||||
bool setRtmpOffset;
|
bool setRtmpOffset;
|
||||||
int64_t rtmpOffset;
|
int64_t rtmpOffset;
|
||||||
uint64_t lastOutTime;
|
uint64_t lastSend;
|
||||||
uint32_t maxbps;
|
uint32_t maxbps;
|
||||||
std::string app_name;
|
std::string app_name;
|
||||||
void parseChunk(Socket::Buffer &inputBuffer);
|
void parseChunk(Socket::Buffer &inputBuffer);
|
||||||
|
|
Loading…
Add table
Reference in a new issue