mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 01:29:18 +00:00
librtmp: Add missing extended timestamp in Type 3 chunks
According to https://rtmp.veriskope.com/docs/spec/#5313-extended-timestamp extended timestamps need to be present in Type 3 chunks (`RTMP_PACKET_SIZE_MINIMUM`) if the previous chunk also included an extended timestamp
This commit is contained in:
parent
03358961aa
commit
7fe5cb7dad
|
@ -4250,6 +4250,7 @@ RTMP_SendPacket(RTMP *r, RTMPPacket *packet, int queue)
|
|||
buffer += nChunkSize;
|
||||
hSize = 0;
|
||||
|
||||
// prepare to send off remaining data in Type 3 chunks
|
||||
if (nSize > 0)
|
||||
{
|
||||
header = buffer - 1;
|
||||
|
@ -4259,6 +4260,11 @@ RTMP_SendPacket(RTMP *r, RTMPPacket *packet, int queue)
|
|||
header -= cSize;
|
||||
hSize += cSize;
|
||||
}
|
||||
if (t >= 0xffffff)
|
||||
{
|
||||
hSize += 4;
|
||||
header -= 4;
|
||||
}
|
||||
*header = (0xc0 | c);
|
||||
if (cSize)
|
||||
{
|
||||
|
@ -4267,6 +4273,8 @@ RTMP_SendPacket(RTMP *r, RTMPPacket *packet, int queue)
|
|||
if (cSize == 2)
|
||||
header[2] = tmp >> 8;
|
||||
}
|
||||
if (t >= 0xffffff)
|
||||
AMF_EncodeInt32(header+hSize-4, header+hSize, t);
|
||||
}
|
||||
}
|
||||
if (tbuf)
|
||||
|
|
Loading…
Reference in a new issue