$ git clone http://tcclient.ion.nu/tc_client.git
commit 52c12ecfbc87b31ac73db1d7c3e29031782569ec
Author: Alicia <...>
Date:   Wed Sep 14 19:56:14 2016 +0200

    tc_client-gtk and camviewer: don't try to play audio if the resampling failed (experimental mic support)

diff --git a/ChangeLog b/ChangeLog
index d28a420..924abfe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,7 @@ tc_client-gtk: break the cameras into two or more rows if it means they can be l
 tc_client-gtk and camviewer: fixed compatibility with newer libavutil.
 tc_client-gtk and camviewer: added compatibility fallbacks for av_image_get_buffer_size() and av_packet_unref()
 tc_client-gtk and camviewer: specify a scaling algorithm for libswscale (mandatory for older versions of libswscale)
+tc_client-gtk and camviewer: don't try to play audio if the resampling failed (experimental mic support)
 libcamera(v4l2): if we failed to read the frame, give grey instead.
 irchack: fixed the order of messages around joining a channel (should fix compatibility with IRC clients a bit pickier than irssi)
 0.38:
diff --git a/utilities/camviewer/camviewer.c b/utilities/camviewer/camviewer.c
index ba4ec46..fc462b6 100644
--- a/utilities/camviewer/camviewer.c
+++ b/utilities/camviewer/camviewer.c
@@ -311,7 +311,7 @@ gboolean handledata(GIOChannel* channel, GIOCondition condition, gpointer datap)
   #else
     int outlen=swr_convert(data->swrctx, cam->frame->data, cam->frame->nb_samples, (const uint8_t**)cam->frame->data, cam->frame->nb_samples);
   #endif
-    camera_playsnd(data, cam, (short*)cam->frame->data[0], outlen);
+    if(outlen>0){camera_playsnd(data, cam, (short*)cam->frame->data[0], outlen);}
 #endif
     return 1;
   }
diff --git a/utilities/gtk/camviewer.c b/utilities/gtk/camviewer.c
index 19a8e0e..32a1d8f 100644
--- a/utilities/gtk/camviewer.c
+++ b/utilities/gtk/camviewer.c
@@ -497,7 +497,7 @@ gboolean handledata(GIOChannel* iochannel, GIOCondition condition, gpointer data
   #else
     int outlen=swr_convert(data->swrctx, cam->frame->data, cam->frame->nb_samples, (const uint8_t**)cam->frame->data, cam->frame->nb_samples);
   #endif
-    camera_playsnd(data->audiopipe, cam, (short*)cam->frame->data[0], outlen);
+    if(outlen>0){camera_playsnd(data->audiopipe, cam, (short*)cam->frame->data[0], outlen);}
 #endif
     return 1;
   }