$ git clone http://tcclient.ion.nu/tc_client.git
commit 963111566e1715bf4d1f208a96585333933d79e3
Author: Alicia <...>
Date:   Wed Oct 5 13:22:13 2016 +0200

    Interpret the "from_owner" subcommand "_close" to tell if our media stream was closed.

diff --git a/ChangeLog b/ChangeLog
index 757c900..05b592d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 0.40:
 Moved the backward compatibility code for avcodec_{send,receive}_{frame,packet} into a separate source file to avoid pulling libavcodec into utilities that don't use it.
 Improved the RTMP acknowledgement code: counting the format 3 headers which were previously skipped, setting a more reasonable acknowledgement interval at startup and giving the server some margin before dropping outgoing video packets.
+Interpret the "from_owner" subcommand "_close" to tell if our media stream was closed.
 tc_client-gtk: merged camera_remove() and camera_removebynick() into a single function, merged the deallocation of camera data into camera_free()
 tc_client-gtk: moved the postprocessing code into its own source file.
 tc_client-gtk: added greenscreen postprocessor.
diff --git a/client.c b/client.c
index b9f15bf..7ca62ae 100644
--- a/client.c
+++ b/client.c
@@ -962,7 +962,7 @@ int main(int argc, char** argv)
       close(sock);
       return 1; // Getting banned is a failure, right?
     }
-    // from_owner: notices
+    // from_owner: notices, mute, push2talk, closing cams
     else if(amfin->itemcount==3 && amfin->items[0].type==AMF_STRING && amf_comparestrings_c(&amfin->items[0].string, "from_owner") && amfin->items[2].type==AMF_STRING)
     {
       if(!strncmp("notice", amfin->items[2].string.string, 6))
@@ -978,16 +978,22 @@ int main(int argc, char** argv)
         printf("%s %s\n", timestamp(), notice);
         fflush(stdout);
       }
-      else if(!strncmp("mute", amfin->items[2].string.string, 4))
+      else if(!strcmp("mute", amfin->items[2].string.string))
       {
         printf("%s Non-moderators have been temporarily muted.\n", timestamp());
         fflush(stdout);
       }
-      else if(!strncmp("push2talk", amfin->items[2].string.string, 9))
+      else if(!strcmp("push2talk", amfin->items[2].string.string))
       {
         printf("%s Push to talk request has been sent to non-moderators.\n", timestamp());
         fflush(stdout);
       }
+      else if(!strncmp("_close", amfin->items[2].string.string, 6) && !strcmp(&amfin->items[2].string.string[6], nickname))
+      {
+        printf("Outgoing media stream was closed\n");
+        fflush(stdout);
+        stream_stopvideo(sock, idlist_get(nickname));
+      }
     }
     // nickinuse, the nick we wanted to change to is already taken
     else if(amfin->itemcount>0 && amfin->items[0].type==AMF_STRING &&  amf_comparestrings_c(&amfin->items[0].string, "nickinuse"))