mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
bin: Drop need-context messages without source instead of crashing
This commit is contained in:
parent
0c6f5b3e4c
commit
e6f55805b4
1 changed files with 22 additions and 14 deletions
|
@ -4013,6 +4013,8 @@ gst_bin_handle_message_func (GstBin * bin, GstMessage * message)
|
||||||
GList *l, *contexts;
|
GList *l, *contexts;
|
||||||
|
|
||||||
gst_message_parse_context_type (message, &context_type);
|
gst_message_parse_context_type (message, &context_type);
|
||||||
|
|
||||||
|
if (src) {
|
||||||
GST_OBJECT_LOCK (bin);
|
GST_OBJECT_LOCK (bin);
|
||||||
contexts = GST_ELEMENT_CAST (bin)->contexts;
|
contexts = GST_ELEMENT_CAST (bin)->contexts;
|
||||||
GST_LOG_OBJECT (bin, "got need-context message type: %s", context_type);
|
GST_LOG_OBJECT (bin, "got need-context message type: %s", context_type);
|
||||||
|
@ -4033,6 +4035,12 @@ gst_bin_handle_message_func (GstBin * bin, GstMessage * message)
|
||||||
} else {
|
} else {
|
||||||
gst_message_unref (message);
|
gst_message_unref (message);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
g_warning
|
||||||
|
("Got need-context message in bin '%s' without source element, dropping",
|
||||||
|
GST_ELEMENT_NAME (bin));
|
||||||
|
gst_message_unref (message);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue