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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8296>
This commit is contained in:
Tomas Granath 2025-01-13 16:19:26 +01:00 committed by GStreamer Marge Bot
parent 794ad2841a
commit 49e4c0b451

View file

@ -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);
}
}