diff --git a/plugins/obs-outputs/librtmp/rtmp.c b/plugins/obs-outputs/librtmp/rtmp.c index cfc7288a0..014a594d7 100644 --- a/plugins/obs-outputs/librtmp/rtmp.c +++ b/plugins/obs-outputs/librtmp/rtmp.c @@ -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)