mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 13:21:28 +00:00
typefind: copy seqnum to new segment event
Fixes: #635 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/700>
This commit is contained in:
parent
17feeb1bd6
commit
12bc728805
2 changed files with 8 additions and 2 deletions
|
@ -527,6 +527,7 @@ gst_type_find_element_seek (GstTypeFindElement * typefind, GstEvent * event)
|
||||||
}
|
}
|
||||||
|
|
||||||
typefind->need_segment = TRUE;
|
typefind->need_segment = TRUE;
|
||||||
|
typefind->seqnum = gst_event_get_seqnum (event);
|
||||||
|
|
||||||
/* restart our task since it might have been stopped when we did the
|
/* restart our task since it might have been stopped when we did the
|
||||||
* flush. */
|
* flush. */
|
||||||
|
@ -1172,9 +1173,12 @@ gst_type_find_element_loop (GstPad * pad)
|
||||||
GstBuffer *outbuf = NULL;
|
GstBuffer *outbuf = NULL;
|
||||||
|
|
||||||
if (typefind->need_segment) {
|
if (typefind->need_segment) {
|
||||||
|
GstEvent *event;
|
||||||
typefind->need_segment = FALSE;
|
typefind->need_segment = FALSE;
|
||||||
gst_pad_push_event (typefind->src,
|
event = gst_event_new_segment (&typefind->segment);
|
||||||
gst_event_new_segment (&typefind->segment));
|
if (typefind->seqnum != 0)
|
||||||
|
gst_event_set_seqnum (event, typefind->seqnum);
|
||||||
|
gst_pad_push_event (typefind->src, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Pull 4k blocks and send downstream */
|
/* Pull 4k blocks and send downstream */
|
||||||
|
@ -1253,6 +1257,7 @@ gst_type_find_element_activate_sink_mode (GstPad * pad, GstObject * parent,
|
||||||
typefind->need_segment = TRUE;
|
typefind->need_segment = TRUE;
|
||||||
typefind->need_stream_start = TRUE;
|
typefind->need_stream_start = TRUE;
|
||||||
typefind->offset = 0;
|
typefind->offset = 0;
|
||||||
|
typefind->seqnum = 0;
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
} else {
|
} else {
|
||||||
res = gst_pad_stop_task (pad);
|
res = gst_pad_stop_task (pad);
|
||||||
|
|
|
@ -65,6 +65,7 @@ struct _GstTypeFindElement {
|
||||||
gboolean need_stream_start;
|
gboolean need_stream_start;
|
||||||
GstSegment segment;
|
GstSegment segment;
|
||||||
guint64 offset;
|
guint64 offset;
|
||||||
|
guint32 seqnum;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstTypeFindElementClass {
|
struct _GstTypeFindElementClass {
|
||||||
|
|
Loading…
Reference in a new issue