mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 09:41:07 +00:00
flvmux: Use gst_aggregator_update_segment() instead of randomly pushing a segment event
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7542>
This commit is contained in:
parent
cff7e3986e
commit
252378f1ae
1 changed files with 1 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue