diff -r 43f66895cc86 -r 367d791aeb57 gmyth-stream/gmemcoder/src/main.c --- a/gmyth-stream/gmemcoder/src/main.c Tue May 08 14:59:15 2007 +0100 +++ b/gmyth-stream/gmemcoder/src/main.c Thu May 17 14:07:27 2007 +0100 @@ -26,19 +26,29 @@ static gchar* output_uri = NULL; + +static gboolean +_quit (gpointer data) +{ + g_debug ("Quit"); + g_object_unref (data); + g_main_loop_quit (mainloop); + return FALSE; +} + static void _mencoder_eos_cb (GMencoder *mencoder, gpointer data) -{ +{ g_print ("EOS\n"); - g_main_loop_quit ((GMainLoop *) data); + g_idle_add (_quit, mencoder); } + static void _mencoder_error_cb (GMencoder *mencoder, const gchar* msg, gpointer data) { g_print ("Error: %s\n", msg); - g_mencoder_close_stream (mencoder); - g_main_loop_quit ((GMainLoop *) data); + g_idle_add (_quit, mencoder); } static gboolean