glimagesink: need to clean window_id when state change form READY to NULL

When application change pipeline state NULL->READY and then READY->NULL,
glimagesink will not clear glsink->window_id. After that, when application
change state NULL->READY, the new_window_id is equal to window_id, glimagesink
will not set window handle. It will use the internal window but not the window
create by application.

https://bugzilla.gnome.org/show_bug.cgi?id=765241
This commit is contained in:
Haihua Hu 2016-04-19 10:51:14 +08:00 committed by Tim-Philipp Müller
parent 981beba52d
commit b43af664bc

View file

@ -1045,6 +1045,8 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition)
gst_object_unref (glimage_sink->context);
glimage_sink->context = NULL;
}
glimage_sink->window_id = 0;
if (glimage_sink->other_context) {
gst_object_unref (glimage_sink->other_context);