parsebin: Check for shutdown before exposing pads
We already checked previously, but we need to do it before adding pads.
This commit is contained in:
parent
92e8876844
commit
d53ccfd8e5
@ -3539,6 +3539,15 @@ retry:
|
|||||||
/* re-order pads : video, then audio, then others */
|
/* re-order pads : video, then audio, then others */
|
||||||
endpads = g_list_sort (endpads, (GCompareFunc) sort_end_pads);
|
endpads = g_list_sort (endpads, (GCompareFunc) sort_end_pads);
|
||||||
|
|
||||||
|
/* Don't expose if we're currently shutting down */
|
||||||
|
DYN_LOCK (parsebin);
|
||||||
|
if (G_UNLIKELY (parsebin->shutdown)) {
|
||||||
|
GST_WARNING_OBJECT (parsebin,
|
||||||
|
"Currently, shutting down, aborting exposing");
|
||||||
|
DYN_UNLOCK (parsebin);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Expose pads */
|
/* Expose pads */
|
||||||
for (tmp = endpads; tmp; tmp = tmp->next) {
|
for (tmp = endpads; tmp; tmp = tmp->next) {
|
||||||
GstParsePad *parsepad = (GstParsePad *) tmp->data;
|
GstParsePad *parsepad = (GstParsePad *) tmp->data;
|
||||||
@ -3578,6 +3587,8 @@ retry:
|
|||||||
GST_INFO_OBJECT (parsepad, "added new parsed pad");
|
GST_INFO_OBJECT (parsepad, "added new parsed pad");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DYN_UNLOCK (parsebin);
|
||||||
|
|
||||||
/* Unblock internal pads. The application should have connected stuff now
|
/* Unblock internal pads. The application should have connected stuff now
|
||||||
* so that streaming can continue. */
|
* so that streaming can continue. */
|
||||||
for (tmp = endpads; tmp; tmp = tmp->next) {
|
for (tmp = endpads; tmp; tmp = tmp->next) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user