mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +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)
|
gst_flv_mux_rewrite_header (GstFlvMux * mux)
|
||||||
{
|
{
|
||||||
GstBuffer *rewrite, *index, *tmp;
|
GstBuffer *rewrite, *index, *tmp;
|
||||||
GstEvent *event;
|
|
||||||
guint8 *data;
|
guint8 *data;
|
||||||
gdouble d;
|
gdouble d;
|
||||||
GList *l;
|
GList *l;
|
||||||
|
@ -1839,11 +1838,7 @@ gst_flv_mux_rewrite_header (GstFlvMux * mux)
|
||||||
/* seek back to the preallocated index space */
|
/* seek back to the preallocated index space */
|
||||||
gst_segment_init (&segment, GST_FORMAT_BYTES);
|
gst_segment_init (&segment, GST_FORMAT_BYTES);
|
||||||
segment.start = segment.time = 13 + 29;
|
segment.start = segment.time = 13 + 29;
|
||||||
event = gst_event_new_segment (&segment);
|
gst_aggregator_update_segment (GST_AGGREGATOR (mux), &segment);
|
||||||
if (!gst_pad_push_event (mux->srcpad, event)) {
|
|
||||||
GST_WARNING_OBJECT (mux, "Seek to rewrite header failed");
|
|
||||||
return GST_FLOW_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* determine duration now based on our own timestamping,
|
/* determine duration now based on our own timestamping,
|
||||||
* so that it is likely many times better and consistent
|
* so that it is likely many times better and consistent
|
||||||
|
|
Loading…
Reference in a new issue