gtk: Do not forget to release OBJECT_LOCK on error path

https://bugzilla.gnome.org/show_bug.cgi?id=755542
This commit is contained in:
Thibault Saunier 2015-09-24 15:51:28 +02:00
parent 01057609f1
commit bdcb8208eb

View file

@ -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, &gtk_sink->v_info))
if (!gtk_gst_base_widget_set_format (gtk_sink->widget, &gtk_sink->v_info)) {
GST_OBJECT_UNLOCK (gtk_sink);
return FALSE;
}
GST_OBJECT_UNLOCK (gtk_sink);
return TRUE;