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:
Jan Alexander Steffens (heftig) 2022-03-07 18:46:08 +01:00 committed by GStreamer Marge Bot
parent 34c6063769
commit e5dbf86a54

View file

@ -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,9 +1147,7 @@ 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;
}
GST_BUFFER_PTS (buf) += mux->output_ts_offset;
}
if (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_PTS (buf))) {