mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
subparse: ensure serialized sending of segment event at proper time
This commit is contained in:
parent
dd1e4f5ebb
commit
dac113a867
1 changed files with 7 additions and 1 deletions
|
@ -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,
|
GST_DEBUG_OBJECT (self, "segment after seek: %" GST_SEGMENT_FORMAT,
|
||||||
&self->segment);
|
&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 {
|
} else {
|
||||||
GST_WARNING_OBJECT (self, "seek to 0 bytes failed");
|
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) */
|
* it received via its video pads instead, so all is fine then too) */
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
gst_event_unref (event);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case GST_EVENT_FLUSH_START:
|
case GST_EVENT_FLUSH_START:
|
||||||
|
|
Loading…
Reference in a new issue