From: Olivier CrĂȘte Date: Mon, 23 Apr 2018 15:19:18 +0000 (-0400) Subject: flvmux: Save the current position in the output segment X-Git-Tag: 1.16.2~569 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=11297c333712e5f613493e37b31c4b0643698f7d;p=platform%2Fupstream%2Fgst-plugins-good.git flvmux: Save the current position in the output segment https://bugzilla.gnome.org/show_bug.cgi?id=795332 --- diff --git a/gst/flv/gstflvmux.c b/gst/flv/gstflvmux.c index 826658f..b241bcd 100644 --- a/gst/flv/gstflvmux.c +++ b/gst/flv/gstflvmux.c @@ -656,6 +656,12 @@ gst_flv_mux_release_pad (GstElement * element, GstPad * pad) static GstFlowReturn gst_flv_mux_push (GstFlvMux * mux, GstBuffer * buffer) { + GstAggregator *agg = GST_AGGREGATOR (mux); + GstAggregatorPad *srcpad = GST_AGGREGATOR_PAD (agg->srcpad); + + if (GST_BUFFER_PTS_IS_VALID (buffer)) + srcpad->segment.position = GST_BUFFER_PTS (buffer); + /* pushing the buffer that rewrites the header will make it no longer be the * total output size in bytes, but it doesn't matter at that point */ mux->byte_count += gst_buffer_get_size (buffer);