From 49e4c0b451e2888bfa9636d460c11a0f6ea9be16 Mon Sep 17 00:00:00 2001 From: Tomas Granath Date: Mon, 13 Jan 2025 16:19:26 +0100 Subject: [PATCH] oggdemux: Do not change total duration until new duration is found After calculating a correct duration the oggdemux in some cases sets the duration to GST_CLOCK_TIME_NONE. After that any seek will fail due to the oggdemux calculating a target time after the actual duration. Part-of: --- subprojects/gst-plugins-base/ext/ogg/gstoggdemux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-base/ext/ogg/gstoggdemux.c b/subprojects/gst-plugins-base/ext/ogg/gstoggdemux.c index d46540b086..ca1931c3ee 100644 --- a/subprojects/gst-plugins-base/ext/ogg/gstoggdemux.c +++ b/subprojects/gst-plugins-base/ext/ogg/gstoggdemux.c @@ -661,7 +661,7 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet, /* use total time to update the total ogg time */ if (ogg->total_time == -1) { ogg->total_time = ipad->map.total_time; - } else if (ipad->map.total_time > 0) { + } else if (GST_CLOCK_TIME_IS_VALID (ipad->map.total_time)) { ogg->total_time = MAX (ogg->total_time, ipad->map.total_time); } }