gtk: Fix race between queue_draw and destroy
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 15 Jul 2015 18:32:42 +0000 (14:32 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 16 Jul 2015 21:05:36 +0000 (17:05 -0400)
commit1a7c9b82f4dd17a55da8a383c59b43ed06e23b85
tree6977c0ac3fcb55e95c9e9001168a348d0b913d84
parent8d9fbc5e49241e109a10c4e52ebeb90422d6cb02
gtk: Fix race between queue_draw and destroy

In GTK dispose can be called before the last ref is reached. This
happens when you close the container window. The dispose will be
explicitly called, and destroyed notify will be fired. This patch
fixes this race by properly tracking the widget state.

In the sink, we now set the widget pointer to NULL, so the widget
will properly get created again if you set your pipeline to NULL
state after the widget was destroy, and set it back to PLAYING.

https://bugzilla.gnome.org/show_bug.cgi?id=751104
ext/gtk/gstgtkglsink.c
ext/gtk/gstgtkglsink.h
ext/gtk/gstgtksink.c
ext/gtk/gtkgstglwidget.c
ext/gtk/gtkgstwidget.c