mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-09 19:09:41 +00:00
vaapidecode: unlock condition variables before shutting down the element
Otherwise threads might wait for them, causing the shutdown of the element to deadlock on the streaming thread. https://bugzilla.gnome.org/show_bug.cgi?id=734616
This commit is contained in:
parent
c551cc7cc3
commit
2af44842c6
1 changed files with 6 additions and 0 deletions
|
@ -929,7 +929,13 @@ gst_vaapidecode_change_state (GstElement * element, GstStateChange transition)
|
|||
|
||||
switch (transition) {
|
||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||
g_mutex_lock(&decode->decoder_mutex);
|
||||
decode->decoder_finish = TRUE;
|
||||
g_cond_signal(&decode->decoder_finish_done);
|
||||
g_cond_signal(&decode->decoder_ready);
|
||||
g_mutex_unlock(&decode->decoder_mutex);
|
||||
gst_pad_stop_task(GST_VAAPI_PLUGIN_BASE_SRC_PAD(decode));
|
||||
decode->decoder_finish = FALSE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue