$ git clone http://tcclient.ion.nu/tc_client.git
commit c939a4e2cad39715377e7e28c444d19ada43867b
Author: Alicia <...>
Date:   Tue Feb 21 08:35:51 2017 +0100

    Added workaround in the RTMP acknowledgement code for when 4 gigabytes of data has been sent and the 32bit integer rolls around to 0.

diff --git a/ChangeLog b/ChangeLog
index 7b9a332..e5a6ea9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@ Don't bother trying to verify certificates on windows (lacking a ca bundle)
 Fixed tinychat account support.
 Call curl_easy_cleanup() at the end of the session to make sure cookies get written.
 Adjusted tinychat account support for the latest compatibility-breaking changes.
+Added workaround in the RTMP acknowledgement code for when 4 gigabytes of data has been sent and the 32bit integer rolls around to 0.
 modbot: use https instead of http and use the tcclient subdomain since some DNSes have trouble with underscores.
 modbot: added an option (--no-unapproved) to not add any unapproved videos to queue (videos still get approved by mods requesting or playing them manually)
 tc_client-gtk: fixed a race-condition in the builtin video player.
diff --git a/rtmp.c b/rtmp.c
index e237cce..e76f32e 100644
--- a/rtmp.c
+++ b/rtmp.c
@@ -1,6 +1,6 @@
 /*
     tc_client, a simple non-flash client for tinychat(.com)
-    Copyright (C) 2015-2016  alicia@ion.nu
+    Copyright (C) 2015-2017  alicia@ion.nu
 
     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU Affero General Public License as published by
@@ -213,7 +213,10 @@ static char firstpacket(unsigned int chunkid)
 void rtmp_send(int sock, struct rtmp* rtmp)
 {
   #define rwrite(x,y,z) write(x,y,z); rtmpsent+=z // Add to the data sent counter
-  if(rtmpsent>rtmpack && rtmp->type==RTMP_VIDEO){return;}
+  if(rtmpsent>rtmpack && rtmp->type==RTMP_VIDEO && rtmpsent<UINT32_MAX-ackwindow)
+  {
+    return;
+  }
   // Header format and stream ID
   unsigned int fmt=(rtmp->msgid?0:1);
   if(firstpacket(rtmp->chunkid)){fmt=0;}