$ git clone http://tcclient.ion.nu/tc_client.git
commit 1a56ad403b7b27ed622f6ba01a3bff74272334af
Author: Alicia <...>
Date:   Sun Sep 25 15:40:34 2016 +0200

    tc_client-gtk: use the camera's own copy of its ID for g_timeout_add() rather than what camera_new() was called with. And in configure, include libavutil/mem.h if we fall back on av_freep()

diff --git a/ChangeLog b/ChangeLog
index 4cd4e95..02862d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@ tc_client-gtk: moved the postprocessing code into its own source file.
 tc_client-gtk: added greenscreen postprocessor.
 tc_client-gtk: added GTK+2 compatibility code related to the greenscreen postprocessor.
 tc_client-gtk: changed camera input for broadcasting from using a thread to using g_timeout.
+tc_client-gtk: use the camera's own copy of its ID for g_timeout_add() rather than what camera_new() was called with. And in configure, include libavutil/mem.h if we fall back on av_freep()
 tc_client-gtk and camviewer: updated to libavcodec's avcodec_{send,receive}_{frame,packet} API.
 0.39:
 Added a /closecam command to stop receiving a cam stream.
diff --git a/configure b/configure
index 10b0229..416c1c4 100755
--- a/configure
+++ b/configure
@@ -121,6 +121,7 @@ if [ "x$avcodeclibs" != "x" ]; then
     echo "AVCODEC_LIBS=${avcodeclibs}" >> config.mk
     echo "AVCODEC_CFLAGS=`pkg-config --cflags libavcodec`" >> config.mk
     if ! testbuild 'avcodec_free_context' 'void* x=avcodec_free_context;' 'libavcodec/avcodec.h' "$avcodecflags"; then
+      echo '#include <libavutil/mem.h>' >> config.h
       echo '#define avcodec_free_context(x) \' >> config.h
       echo '{ \' >> config.h
       echo '  avcodec_close(*x); \' >> config.h
diff --git a/utilities/gtk/media.c b/utilities/gtk/media.c
index 427e833..36b39ef 100644
--- a/utilities/gtk/media.c
+++ b/utilities/gtk/media.c
@@ -156,7 +156,7 @@ struct camera* camera_new(const char* nick, const char* id)
   gtk_box_pack_start(GTK_BOX(cam->box), eventbox, 0, 0, 0);
   gtk_box_pack_start(GTK_BOX(cam->box), cam->label, 0, 0, 0);
   g_signal_connect(eventbox, "button-release-event", G_CALLBACK(gui_show_cam_menu), cam->id);
-  cam->placeholder=g_timeout_add(100, camplaceholder_update, (char*)id);
+  cam->placeholder=g_timeout_add(100, camplaceholder_update, cam->id);
   // Initialize postprocessing values
   postproc_init(&cam->postproc);
   return cam;