From a7e8f16df3ea662eeea45d5eed53d3d9a42bb164 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Tue, 5 Jun 2018 17:30:47 +0200 Subject: [PATCH] playsink: Properly propagate SEGMENT seqnum When flushing chains, make sure the FLUSH events have seqnum that are consistent with the current SEGMENT seqnum --- gst/playback/gstplaysink.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c index ead2e68..4e1cb6a 100644 --- a/gst/playback/gstplaysink.c +++ b/gst/playback/gstplaysink.c @@ -2220,6 +2220,8 @@ gst_play_sink_sink_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer, /* make the bin drop all cached data. * This event will be dropped on the src pad, if any. */ event = gst_event_new_flush_start (); + if (segment_event) + gst_event_set_seqnum (event, gst_event_get_seqnum (segment_event)); structure = gst_event_writable_structure (event); gst_structure_id_set (structure, _playsink_reset_segment_event_marker_id, G_TYPE_BOOLEAN, TRUE, NULL); @@ -2232,6 +2234,8 @@ gst_play_sink_sink_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer, /* make queue drop all cached data. * This event will be dropped on the src pad. */ event = gst_event_new_flush_stop (TRUE); + if (segment_event) + gst_event_set_seqnum (event, gst_event_get_seqnum (segment_event)); structure = gst_event_writable_structure (event); gst_structure_id_set (structure, _playsink_reset_segment_event_marker_id, G_TYPE_BOOLEAN, TRUE, NULL); -- 2.7.4