$ git clone http://tcclient.ion.nu/tc_client.git
commit 16cbf3de5205a9cac29780d56e1c62925ca5a9ee
Author: Alicia <...>
Date:   Sat May 23 20:24:59 2015 +0200

    tc_client-gtk: when camming down, remove the glib event source for our cam stream.

diff --git a/ChangeLog b/ChangeLog
index 2420b4b..de2a525 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 Added an 'install' make target, adjusted utilities to run tc_client from PATH unless they were run from the build directory (i.e. './<executable>')
 irchack: send passwords by pipe, not argument.
 tc_client-gtk: ignore anything after the offset in /mbs commands.
+tc_client-gtk: when camming down, remove the glib event source for our cam stream.
 0.31:
 Fixed the issue where messages would show up on kanji on some platforms (a proper fix instead of the earlier android & apple workaround)
 When a message is sent with a privacy field, send it once with 'b' (broadcasting) and once with 'n' (not-broadcasting)
diff --git a/utilities/gtk/camviewer.c b/utilities/gtk/camviewer.c
index 4990b21..8a1c45d 100644
--- a/utilities/gtk/camviewer.c
+++ b/utilities/gtk/camviewer.c
@@ -502,10 +502,12 @@ void audiothread(int fd)
 
 #ifdef HAVE_V4L2
 pid_t camproc=0;
+unsigned int cameventsource;
 void togglecam(GtkCheckMenuItem* item, struct viddata* data)
 {
   if(!gtk_check_menu_item_get_active(item))
   {
+    g_source_remove(cameventsource);
     kill(camproc, SIGINT);
     camproc=0;
     dprintf(tc_client_in[1], "/camdown\n");
@@ -590,7 +592,7 @@ packet.size=0;
   close(campipe[1]);
   GIOChannel* channel=g_io_channel_unix_new(campipe[0]);
   g_io_channel_set_encoding(channel, 0, 0);
-  g_io_add_watch(channel, G_IO_IN, handledata, data);
+  cameventsource=g_io_add_watch(channel, G_IO_IN, handledata, data);
 }
 #endif