mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +00:00
decodebin2: Don't try to add pads when shutting down
Be even more agressive than before and just hold the DYN lock when/if adding pads and return if we are shutting down.
This commit is contained in:
parent
77e5a71a15
commit
ce8f51e30e
1 changed files with 9 additions and 0 deletions
|
@ -4697,6 +4697,14 @@ retry:
|
|||
/* re-order pads : video, then audio, then others */
|
||||
endpads = g_list_sort (endpads, (GCompareFunc) sort_end_pads);
|
||||
|
||||
/* Don't add pads if we are shutting down */
|
||||
DYN_LOCK (dbin);
|
||||
if (G_UNLIKELY (dbin->shutdown)) {
|
||||
GST_WARNING_OBJECT (dbin, "Currently, shutting down, aborting exposing");
|
||||
DYN_UNLOCK (dbin);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Expose pads */
|
||||
for (tmp = endpads; tmp; tmp = tmp->next) {
|
||||
GstDecodePad *dpad = (GstDecodePad *) tmp->data;
|
||||
|
@ -4727,6 +4735,7 @@ retry:
|
|||
/* 3. emit signal */
|
||||
GST_INFO_OBJECT (dpad, "added new decoded pad");
|
||||
}
|
||||
DYN_UNLOCK (dbin);
|
||||
|
||||
/* 4. Signal no-more-pads. This allows the application to hook stuff to the
|
||||
* exposed pads */
|
||||
|
|
Loading…
Reference in a new issue