maiku.vv: 60192276: Fix up video preview error handling.
maiku at soc.pidgin.im
maiku at soc.pidgin.im
Wed Aug 27 04:00:34 EDT 2008
-----------------------------------------------------------------
Revision: 60192276da78e09c5aa8c2ea3c97df0ff2ab3d76
Ancestor: 86774cdbc6fcdccad43c893f30f3f3398d75dc7b
Author: maiku at soc.pidgin.im
Date: 2008-08-27T06:17:33
Branch: im.pidgin.maiku.vv
URL: http://d.pidgin.im/viewmtn/revision/info/60192276da78e09c5aa8c2ea3c97df0ff2ab3d76
Modified files:
pidgin/gtkprefs.c
ChangeLog:
Fix up video preview error handling.
-------------- next part --------------
============================================================
--- pidgin/gtkprefs.c 970388c8a7288ff0623f768a9e53da66c66212c5
+++ pidgin/gtkprefs.c c7f7b42aa6eda5f716483a504d31b1538f9161b3
@@ -2069,7 +2069,7 @@ preview_video_bus_call(GstBus *bus, GstM
gst_element_set_state(pipeline, GST_STATE_NULL);
gst_object_unref(GST_PIPELINE(pipeline));
- return TRUE;
+ return FALSE;
}
static void
@@ -2081,7 +2081,7 @@ preview_button_clicked(GtkWidget *widget
/* create a preview window... */
GstElement *pipeline = NULL;
- GError *p_err;
+ GError *p_err = NULL;
gchar *test_pipeline_str = NULL;
@@ -2098,6 +2098,13 @@ preview_button_clicked(GtkWidget *widget
g_free(test_pipeline_str);
+ if (pipeline == NULL) {
+ purple_debug_error("gtkprefs",
+ "Error starting preview: %s\n", p_err->message);
+ g_error_free(p_err);
+ return;
+ }
+
bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline));
gst_bus_add_watch(bus, preview_video_bus_call, pipeline);
gst_object_unref(bus);
More information about the Commits
mailing list