diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2011-08-18 20:44:01 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2011-08-18 20:44:01 +0100 |
commit | 7043bf9d55664282a4535093282527779dab4368 (patch) | |
tree | 87f0e499494d9932b094b2e5f13ff20d625d55bb | |
parent | eb08ed6ed0a33e76a2190e3e036c899b1a222493 (diff) |
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
-rw-r--r-- | libs/gst/base/gstbaseparse.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c index 59865c277..65160c362 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c @@ -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); |