From 4e946890b217b1a24051ef525cc94fbdb2b47174 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 8 Dec 2022 08:17:56 +0100 Subject: [PATCH] adaptivedemux2: Global output position is always positive Change to non-signed GstClockTime for tracking Part-of: --- .../ext/adaptivedemux2/gstadaptivedemux-private.h | 2 +- .../gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-private.h b/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-private.h index a72cefe3af..6ee1a3bf50 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-private.h +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-private.h @@ -140,7 +140,7 @@ struct _GstAdaptiveDemuxPrivate /* Current output selection seqnum */ guint32 current_selection_seqnum; /* Current output position (in running time) */ - GstClockTimeDiff global_output_position; + GstClockTime global_output_position; /* End of fields protected by output_lock */ gint n_audio_streams, n_video_streams, n_subtitle_streams; diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux.c index 3f771c7966..714284d320 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux.c @@ -3517,7 +3517,7 @@ restart: } /* Store global output position */ - if (global_output_position != GST_CLOCK_STIME_NONE) { + if (global_output_position >= 0) { demux->priv->global_output_position = global_output_position; /* And see if any streams need to be woken for more input */