baseparse: fix crash on seek from streaming thread on newsegment event

Event if it's not allowed, we can easily prevent it, so let's do
that.

https://bugzilla.gnome.org/show_bug.cgi?id=656771
This commit is contained in:
Tim-Philipp Müller 2011-08-18 20:44:01 +01:00
parent eb08ed6ed0
commit 7043bf9d55

View file

@ -1851,10 +1851,14 @@ gst_base_parse_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
parse->priv->close_segment = NULL;
}
if (G_UNLIKELY (parse->priv->pending_segment)) {
GstEvent *pending_segment;
pending_segment = parse->priv->pending_segment;
parse->priv->pending_segment = NULL;
GST_DEBUG_OBJECT (parse, "%s push pending segment",
parse->priv->pad_mode == GST_ACTIVATE_PULL ? "loop" : "chain");
gst_pad_push_event (parse->srcpad, parse->priv->pending_segment);
parse->priv->pending_segment = NULL;
gst_pad_push_event (parse->srcpad, pending_segment);
/* have caps; check identity */
gst_base_parse_check_media (parse);