|
|
@@ -4123,8 +4123,17 @@ RTMP_SendPacket(RTMP *r, RTMPPacket *packet, int queue)
|
|
|
&& packet->m_headerType == RTMP_PACKET_SIZE_MEDIUM)
|
|
|
packet->m_headerType = RTMP_PACKET_SIZE_SMALL;
|
|
|
|
|
|
- if (prevPacket->m_nTimeStamp == packet->m_nTimeStamp
|
|
|
- && packet->m_headerType == RTMP_PACKET_SIZE_SMALL)
|
|
|
+ /* Per https://rtmp.veriskope.com/docs/spec/#53124-type-3 type 3 chunks/RTMP_PACKET_SIZE_MINIMUM
|
|
|
+ * always use the previously sent (delta) timestamp as their _delta_ timestamp, so we need to inspect
|
|
|
+ * whatever was previously sent, rather than just looking at the previous packet's absolute timestamp.
|
|
|
+ *
|
|
|
+ * The type 3 chunks/RTMP_PACKET_SIZE_MINIMUM packets produced here specify the beginning of a new
|
|
|
+ * message as opposed to message continuation type 3 chunks that are handled in the loop further down
|
|
|
+ * in this function.
|
|
|
+ */
|
|
|
+ uint32_t delta = packet->m_nTimeStamp - prevPacket->m_nTimeStamp;
|
|
|
+ if (delta == prevPacket->m_nLastWireTimeStamp
|
|
|
+ && packet->m_headerType == RTMP_PACKET_SIZE_SMALL)
|
|
|
packet->m_headerType = RTMP_PACKET_SIZE_MINIMUM;
|
|
|
last = prevPacket->m_nTimeStamp;
|
|
|
}
|
|
|
@@ -4140,6 +4149,7 @@ RTMP_SendPacket(RTMP *r, RTMPPacket *packet, int queue)
|
|
|
hSize = nSize;
|
|
|
cSize = 0;
|
|
|
t = packet->m_nTimeStamp - last;
|
|
|
+ packet->m_nLastWireTimeStamp = t;
|
|
|
|
|
|
if (packet->m_body)
|
|
|
{
|