mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 08:55:33 +00:00
mpegtsmux: Use GST_CLOCK_STIME_NONE for output_ts_offset
It's a GstClockTimeDiff, thus GST_CLOCK_TIME_NONE isn't appropriate. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1884>
This commit is contained in:
parent
34c6063769
commit
e5dbf86a54
1 changed files with 3 additions and 5 deletions
|
@ -320,7 +320,7 @@ gst_base_ts_mux_reset (GstBaseTsMux * mux, gboolean alloc)
|
|||
|
||||
if (mux->out_adapter)
|
||||
gst_adapter_clear (mux->out_adapter);
|
||||
mux->output_ts_offset = GST_CLOCK_TIME_NONE;
|
||||
mux->output_ts_offset = GST_CLOCK_STIME_NONE;
|
||||
|
||||
if (mux->tsmux) {
|
||||
if (mux->tsmux->si_sections)
|
||||
|
@ -1133,7 +1133,7 @@ new_packet_cb (GstBuffer * buf, void *user_data, gint64 new_pcr)
|
|||
}
|
||||
|
||||
if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_PTS (buf))) {
|
||||
if (!GST_CLOCK_TIME_IS_VALID (mux->output_ts_offset)) {
|
||||
if (!GST_CLOCK_STIME_IS_VALID (mux->output_ts_offset)) {
|
||||
GstClockTime output_start_time = agg_segment->position;
|
||||
if (agg_segment->position == -1
|
||||
|| agg_segment->position < agg_segment->start) {
|
||||
|
@ -1147,10 +1147,8 @@ new_packet_cb (GstBuffer * buf, void *user_data, gint64 new_pcr)
|
|||
GST_STIME_ARGS (mux->output_ts_offset));
|
||||
}
|
||||
|
||||
if (GST_CLOCK_TIME_IS_VALID (mux->output_ts_offset)) {
|
||||
GST_BUFFER_PTS (buf) += mux->output_ts_offset;
|
||||
}
|
||||
}
|
||||
|
||||
if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_PTS (buf))) {
|
||||
agg_segment->position = GST_BUFFER_PTS (buf);
|
||||
|
|
Loading…
Reference in a new issue