$ git clone http://tcclient.ion.nu/tc_client.git
commit c09e79ae16329d6173d42e37cff5eb983ba24f45
Author: Alicia <...>
Date: Tue Mar 1 13:34:39 2016 +0100
Always use format 0 (all fields included) for the first RTMP packet.
diff --git a/ChangeLog b/ChangeLog
index c040a19..1730377 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
Handle multi-line messages.
Added option --hexcolors to print hex color codes instead of ANSI color escape codes.
Added compatibility code for systems lacking strndup() and made configure test for that and dprintf()
+Always use format 0 (all fields included) for the first RTMP packet.
Makefile: added missing sourcefiles for the tarball target.
Makefile: added some foolproofing for building on windows.
tc_client-gtk: if HOME is not set use "." instead.
diff --git a/rtmp.c b/rtmp.c
index 01b2e31..8a145c0 100644
--- a/rtmp.c
+++ b/rtmp.c
@@ -153,10 +153,12 @@ char rtmp_get(int sock, struct rtmp* rtmp)
return 2;
}
+char firstpacket=1;
void rtmp_send(int sock, struct rtmp* rtmp)
{
// Header format and stream ID
unsigned int fmt=(rtmp->msgid?0:1);
+ if(firstpacket){firstpacket=fmt=0;}
unsigned char basicheader=(rtmp->chunkid<64?rtmp->chunkid:(rtmp->chunkid<256?0:1)) | (fmt<<6);
write(sock, &basicheader, sizeof(basicheader));
if(rtmp->chunkid>=64) // Handle large stream IDs