From 8295b2ae5c3c5f491cf8bf5774634f7fc7e59791 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 28 Nov 2023 11:27:45 -0300 Subject: [PATCH] qtdemux: Determine EOS based on the stream segment Depending on the stream segment might vary (because of edts for example) leading to EOS being sent at the wrong time (too early for example). Part-of: --- subprojects/gst-plugins-good/gst/isomp4/qtdemux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c index f6cb1cee4c..f774f9553d 100644 --- a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c +++ b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c @@ -8453,9 +8453,9 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force) keyframe = QTSAMPLE_KEYFRAME (stream, sample); /* check for segment end */ - if (G_UNLIKELY (demux->segment.stop != -1 - && demux->segment.stop <= stream_pts && keyframe) - && !(demux->upstream_format_is_time && demux->segment.rate < 0)) { + if (G_UNLIKELY (stream->segment.stop != -1 + && stream->segment.stop <= stream_pts && keyframe) + && !(demux->upstream_format_is_time && stream->segment.rate < 0)) { GST_DEBUG_OBJECT (demux, "we reached the end of our segment."); stream->time_position = GST_CLOCK_TIME_NONE; /* this means EOS */