summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2018-08-08 17:35:08 +0200
committerSebastian Dröge <sebastian@centricular.com>2018-10-28 17:03:47 +0000
commit596a4ee12f2be5d3649cac22447b09453965a4ae (patch)
tree78d9db095cb2b98987d1858f6fb2fa612565ab3c
parent33e92afd91274e8b63aceccded344a266d401248 (diff)
downloadgst-plugins-base-596a4ee12f2be5d3649cac22447b09453965a4ae.tar.gz
gst-plugins-base-596a4ee12f2be5d3649cac22447b09453965a4ae.tar.xz
parsebin: Add missing locks/unlocks of the chain mutex
Before freeing pending pads it is required to hold the mutex, that's what is protecting the list of pending pads in other places. https://bugzilla.gnome.org/show_bug.cgi?id=796935
-rw-r--r--gst/playback/gstparsebin.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gst/playback/gstparsebin.c b/gst/playback/gstparsebin.c
index d8fc23295..b066237c9 100644
--- a/gst/playback/gstparsebin.c
+++ b/gst/playback/gstparsebin.c
@@ -3469,14 +3469,16 @@ retry:
/* Get the pads that we're going to expose and mark things as exposed */
uncollected_streams = FALSE;
+ CHAIN_MUTEX_LOCK (parsebin->parse_chain);
if (!gst_parse_chain_expose (parsebin->parse_chain, &endpads, &missing_plugin,
missing_plugin_details, &last_group, &uncollected_streams)) {
g_list_free_full (endpads, (GDestroyNotify) gst_object_unref);
g_string_free (missing_plugin_details, TRUE);
GST_ERROR_OBJECT (parsebin, "Broken chain/group tree");
- g_return_val_if_reached (FALSE);
+ CHAIN_MUTEX_UNLOCK (parsebin->parse_chain);
return FALSE;
}
+ CHAIN_MUTEX_UNLOCK (parsebin->parse_chain);
if (endpads == NULL) {
if (missing_plugin) {
if (missing_plugin_details->len > 0) {
@@ -3726,8 +3728,10 @@ gst_parse_chain_expose (GstParseChain * chain, GList ** endpads,
for (l = group->children; l; l = l->next) {
GstParseChain *childchain = l->data;
+ CHAIN_MUTEX_LOCK (childchain);
ret |= gst_parse_chain_expose (childchain, endpads, missing_plugin,
missing_plugin_details, last_group, uncollected_streams);
+ CHAIN_MUTEX_UNLOCK (childchain);
}
return ret;