From: Mark Nauwelaerts Date: Sat, 24 Jun 2017 20:03:21 +0000 (+0200) Subject: subparse: ensure serialized sending of segment event at proper time X-Git-Tag: 1.16.2~1166 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dac113a867b3803211edea217d41c155583c4cb3;p=platform%2Fupstream%2Fgst-plugins-base.git subparse: ensure serialized sending of segment event at proper time --- diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c index f61c6d4..4cf354d 100644 --- a/gst/subparse/gstsubparse.c +++ b/gst/subparse/gstsubparse.c @@ -284,7 +284,9 @@ gst_sub_parse_src_event (GstPad * pad, GstObject * parent, GstEvent * event) GST_DEBUG_OBJECT (self, "segment after seek: %" GST_SEGMENT_FORMAT, &self->segment); - self->need_segment = TRUE; + /* will mark need_segment when receiving segment from upstream, + * after FLUSH and all that has happened, + * rather than racing with chain */ } else { GST_WARNING_OBJECT (self, "seek to 0 bytes failed"); } @@ -1881,6 +1883,10 @@ gst_sub_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) * it received via its video pads instead, so all is fine then too) */ ret = TRUE; gst_event_unref (event); + /* in either case, let's not simply discard this event; + * trigger sending of the saved requested seek segment + * or the one taken here from upstream */ + self->need_segment = TRUE; break; } case GST_EVENT_FLUSH_START: