From 252378f1aeac2866de5fd9dc47531258bbd26741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 18 Sep 2024 16:16:08 +0300 Subject: [PATCH] flvmux: Use gst_aggregator_update_segment() instead of randomly pushing a segment event Part-of: --- subprojects/gst-plugins-good/gst/flv/gstflvmux.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/subprojects/gst-plugins-good/gst/flv/gstflvmux.c b/subprojects/gst-plugins-good/gst/flv/gstflvmux.c index c86d66bf6b..3496d647f3 100644 --- a/subprojects/gst-plugins-good/gst/flv/gstflvmux.c +++ b/subprojects/gst-plugins-good/gst/flv/gstflvmux.c @@ -1824,7 +1824,6 @@ static GstFlowReturn gst_flv_mux_rewrite_header (GstFlvMux * mux) { GstBuffer *rewrite, *index, *tmp; - GstEvent *event; guint8 *data; gdouble d; GList *l; @@ -1839,11 +1838,7 @@ gst_flv_mux_rewrite_header (GstFlvMux * mux) /* seek back to the preallocated index space */ gst_segment_init (&segment, GST_FORMAT_BYTES); segment.start = segment.time = 13 + 29; - event = gst_event_new_segment (&segment); - if (!gst_pad_push_event (mux->srcpad, event)) { - GST_WARNING_OBJECT (mux, "Seek to rewrite header failed"); - return GST_FLOW_OK; - } + gst_aggregator_update_segment (GST_AGGREGATOR (mux), &segment); /* determine duration now based on our own timestamping, * so that it is likely many times better and consistent