From 1b10553f9063403f1b978b41b41e3efb789d2bc4 Mon Sep 17 00:00:00 2001 From: Lasse Laukkanen Date: Fri, 11 Sep 2009 09:38:51 +0300 Subject: [PATCH] camerabin: improve image done signal emission Use g_idle_add_full() with G_PRIORITY_HIGH to emit image done signal, g_idle_add() is more likely to starve with higher priority events. --- gst/camerabin/gstcamerabin.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/camerabin/gstcamerabin.c b/gst/camerabin/gstcamerabin.c index 61ac7f8821..55ed1a3db3 100644 --- a/gst/camerabin/gstcamerabin.c +++ b/gst/camerabin/gstcamerabin.c @@ -3246,7 +3246,10 @@ gst_camerabin_handle_message_func (GstBin * bin, GstMessage * msg) } else if (GST_MESSAGE_SRC (msg) == GST_OBJECT (camera->imgbin)) { /* Image eos */ GST_DEBUG_OBJECT (camera, "got image eos message"); - g_idle_add (gst_camerabin_imgbin_finished, camera); + /* Calling callback directly will deadlock in + imagebin state change functions */ + g_idle_add_full (G_PRIORITY_HIGH, gst_camerabin_imgbin_finished, camera, + NULL); } break; case GST_MESSAGE_ERROR: