gstreamer/subprojects/gst-plugins-good/gst/isomp4
Alicia Boya García 654ca283a7 qtdemux: Fix premature EOS when some files are played in push mode
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2771

This EOS branch exists so that if a seek with a stop is made, qtdemux
stops accepting bytes from the sink after the entire requested playback
range is demuxed, as otherwise we could keep download content that is
not being used.

This patch fixes two flaws that were present in that EOS check:

1) A comparison was made between track time and movie time without conversion.
This made the check trigger early in files with edit lists. This patch fixes
this by converting the track PTS to movie PTS (stream time) for the check.

2) To avoid sending a EOS prematurely when the segment stop is within a GOP and
B-frames are present, the check for EOS should only be done for keyframes. I
gather this was already the intention with the existing code, but because it
used `stream->on_keyframe` instead of the local variable `keyframe` the old
code was checking if the *previous* frame was a keyframe.

It's interesting to note that these two flaws in the old code mask each other
in most cases: the track PTS will have reached the movie end PTS, but EOS would
only be sent if the previous frame was a keyframe. A simple case where they
wouldn't mask each other, reproducing the bug, is a sequence of 3 frame GOPs
with structure I-B-P.

The following validateflow tests have been added to future-proof the
fix:

 * validate.test.mp4.qtdemux_ibpibp_non_frag_pull.default
 * validate.test.mp4.qtdemux_ibpibp_non_frag_push.default

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5114>
2023-08-03 20:22:51 +00:00
..
atoms.c qtmux: fix byte order for opus extension 2023-06-19 16:09:48 +01:00
atoms.h qtmux: add support for writing vpcC box for VP9 2022-10-28 00:06:07 +00:00
atomsrecovery.c Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
atomsrecovery.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
descriptors.c Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
descriptors.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
fourcc.h qtdemux: Add basic support for AVC-Intra video 2023-01-18 10:01:30 +00:00
gstisoff.c isoff: Fix earliest pts field parse issue 2022-08-23 10:59:56 +00:00
gstisoff.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
gstisomp4element.c Replace gst-i18n-*.h with gi18n-lib.h 2022-04-19 18:01:06 +00:00
gstisomp4elements.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
gstqtmoovrecover.c Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
gstqtmoovrecover.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
gstqtmux-doc.c Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
gstqtmux-doc.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
gstqtmux.c isomp4: Fix (E)AC-3 channel count handling 2023-06-15 15:23:22 +00:00
gstqtmux.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
GstQTMux.prs Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
gstqtmuxmap.c isomp4: Add stream-format = (string) obu-stream to AV1 caps 2023-01-19 12:10:40 +02:00
gstqtmuxmap.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
gstrtpxqtdepay.c Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
gstrtpxqtdepay.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
isomp4-plugin.c Replace gst-i18n-*.h with gi18n-lib.h 2022-04-19 18:01:06 +00:00
LEGAL Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
meson.build meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
properties.c Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
properties.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
qtatomparser.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
qtdemux-webvtt.c qtdemux: Add support for wvtt (WebVTT) subtitles. 2021-10-19 08:56:58 +00:00
qtdemux-webvtt.h qtdemux: Add support for wvtt (WebVTT) subtitles. 2021-10-19 08:56:58 +00:00
qtdemux.c qtdemux: Fix premature EOS when some files are played in push mode 2023-08-03 20:22:51 +00:00
qtdemux.h qtdemux: Don't emit GstSegment correcting start time when in MSE mode 2023-02-18 10:38:30 +00:00
qtdemux_debug.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
qtdemux_dump.c qtdemux: parse Opus and dOps as qtdemux nodes and add size checks 2023-06-19 16:09:48 +01:00
qtdemux_dump.h qtdemux: parse Opus and dOps as qtdemux nodes and add size checks 2023-06-19 16:09:48 +01:00
qtdemux_lang.c Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
qtdemux_lang.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
qtdemux_tags.c Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
qtdemux_tags.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
qtdemux_tree.c Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
qtdemux_tree.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
qtdemux_types.c qtdemux: parse Opus and dOps as qtdemux nodes and add size checks 2023-06-19 16:09:48 +01:00
qtdemux_types.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
qtpalette.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00