vaapisink: finish event thread at stop()

The thread that handles window's events should be finished during
pipeline's shutdown, otherwise it will remain alive during pipeline
re-activation, leading to unexpected problems.

This patch fixes failures of intensive_state_change scenario of
gst-validate

https://bugzilla.gnome.org/show_bug.cgi?id=774241
This commit is contained in:
Hyunjun Ko 2016-11-11 11:40:09 +09:00 committed by Víctor Manuel Jáquez Leal
parent 0d3e1d9072
commit d2e801e87a

View file

@ -1224,6 +1224,7 @@ gst_vaapisink_stop (GstBaseSink * base_sink)
{
GstVaapiSink *const sink = GST_VAAPISINK_CAST (base_sink);
gst_vaapisink_set_event_handling (sink, FALSE);
gst_buffer_replace (&sink->video_buffer, NULL);
gst_vaapi_window_replace (&sink->window, NULL);
@ -1520,8 +1521,6 @@ gst_vaapisink_query (GstBaseSink * base_sink, GstQuery * query)
static void
gst_vaapisink_destroy (GstVaapiSink * sink)
{
gst_vaapisink_set_event_handling (sink, FALSE);
cb_channels_finalize (sink);
gst_buffer_replace (&sink->video_buffer, NULL);
gst_caps_replace (&sink->caps, NULL);