diff options
author | Thibault Saunier <tsaunier@gnome.org> | 2015-09-24 15:51:28 +0200 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2015-09-24 15:57:26 +0200 |
commit | bdcb8208eb0bcca3a426082359e6969472db3166 (patch) | |
tree | 68fa180f41e043935c7bf4a29078586d4e6ac9f5 | |
parent | 01057609f187ffa0487231e6dadc2d980907b8f3 (diff) | |
download | gstreamer-plugins-bad-bdcb8208eb0bcca3a426082359e6969472db3166.tar.gz |
gtk: Do not forget to release OBJECT_LOCK on error path
https://bugzilla.gnome.org/show_bug.cgi?id=755542
-rw-r--r-- | ext/gtk/gstgtkbasesink.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/gtk/gstgtkbasesink.c b/ext/gtk/gstgtkbasesink.c index 9ce6f7cc0..57c5a060a 100644 --- a/ext/gtk/gstgtkbasesink.c +++ b/ext/gtk/gstgtkbasesink.c @@ -347,7 +347,7 @@ gst_gtk_base_sink_stop (GstBaseSink * bsink) } static void -gst_gtk_widget_show_all_and_unref (GtkWidget *widget) +gst_gtk_widget_show_all_and_unref (GtkWidget * widget) { gtk_widget_show_all (widget); g_object_unref (widget); @@ -378,7 +378,8 @@ gst_gtk_base_sink_change_state (GstElement * element, GstStateChange transition) GST_OBJECT_UNLOCK (gtk_sink); if (window) - gst_gtk_invoke_on_main ((GThreadFunc) gst_gtk_widget_show_all_and_unref, window); + gst_gtk_invoke_on_main ((GThreadFunc) gst_gtk_widget_show_all_and_unref, + window); break; } @@ -437,9 +438,10 @@ gst_gtk_base_sink_set_caps (GstBaseSink * bsink, GstCaps * caps) return FALSE; } - if (!gtk_gst_base_widget_set_format (gtk_sink->widget, >k_sink->v_info)) + if (!gtk_gst_base_widget_set_format (gtk_sink->widget, >k_sink->v_info)) { + GST_OBJECT_UNLOCK (gtk_sink); return FALSE; - + } GST_OBJECT_UNLOCK (gtk_sink); return TRUE; |