$ git clone https://tcclient.ion.nu/tc_client.git
commit 8a84a3aeffb7b9693c5abe6189ec7be2ac01a60f
Author: Alicia <...>
Date: Wed Oct 12 11:48:26 2016 +0200
tc_client-gtk: fixed some warnings found with G_DEBUG="fatal-criticals".
diff --git a/ChangeLog b/ChangeLog
index b2690fc..d232503 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,7 @@ tc_client-gtk: added GTK+2 compatibility code related to the greenscreen camera
tc_client-gtk: added compatibility code for windows' lack of pipe()
tc_client-gtk: added workaround for libao not handling the "client_name" option on windows.
tc_client-gtk: added support for broadcasting audio.
+tc_client-gtk: fixed some warnings found with G_DEBUG="fatal-criticals".
libcamera: added support for a virtual X11 camera.
tc_client-gtk and camviewer: updated to libavcodec's avcodec_{send,receive}_{frame,packet} API.
camviewer: removed the old, buggy audio code.
diff --git a/utilities/gtk/media.c b/utilities/gtk/media.c
index d506190..18615aa 100644
--- a/utilities/gtk/media.c
+++ b/utilities/gtk/media.c
@@ -332,7 +332,7 @@ gboolean camselect_frame(void* x)
GdkPixbuf* oldpixbuf=gtk_image_get_pixbuf(GTK_IMAGE(campreview.cam));
GdkPixbuf* gdkframe=scaled_gdk_pixbuf_from_cam(camselect.current, camselect.size.width, camselect.size.height, PREVIEW_MAX_WIDTH, PREVIEW_MAX_HEIGHT);
gtk_image_set_from_pixbuf(GTK_IMAGE(campreview.cam), gdkframe);
- g_object_unref(oldpixbuf);
+ if(oldpixbuf){g_object_unref(oldpixbuf);}
return G_SOURCE_CONTINUE;
}
@@ -488,7 +488,7 @@ void updatescaling(unsigned int width, unsigned int height, char changedcams)
}
// libswscale doesn't handle unreasonably small sizes well
if(camsize_scale.width<8){camsize_scale.width=8;}
- if(camsize_scale.height<1){camsize_scale.height=1;}
+ if(camsize_scale.height<6){camsize_scale.height=6;}
// Rescale current images to fit
for(i=0; i<camcount; ++i)
{
@@ -511,7 +511,7 @@ gboolean camplaceholder_update(void* id)
// Scale and replace the current image on camera
GdkPixbuf* pixbuf=gdk_pixbuf_scale_simple(frame, camsize_scale.width, camsize_scale.height, GDK_INTERP_BILINEAR);
gtk_image_set_from_pixbuf(GTK_IMAGE(cam->cam), pixbuf);
- g_object_unref(oldpixbuf);
+ if(oldpixbuf){g_object_unref(oldpixbuf);}
return G_SOURCE_CONTINUE;
}