gstreamer/subprojects/gst-integration-testsuites
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
..
ges scenarios: Update for videoaggregator rounding behavior change 2022-02-19 06:53:02 +00:00
medias@b4dd49b992 qtdemux: Fix premature EOS when some files are played in push mode 2023-08-03 20:22:51 +00:00
testsuites qtdemux: Fix premature EOS when some files are played in push mode 2023-08-03 20:22:51 +00:00
.gitignore Import gst-integration-testsuites 2021-09-24 16:29:33 -03:00
HACKING Import gst-integration-testsuites 2021-09-24 16:29:33 -03:00
integration-testsuites.config Import gst-integration-testsuites 2021-09-24 16:29:33 -03:00
meson.build Back to development 2023-07-20 16:57:47 +01:00
README Import gst-integration-testsuites 2021-09-24 16:29:33 -03:00

This the official GStreamer integration testsuites implementation repository.
Those testsuites are meant to be used with GstValidate available in the
gst-devtools[0] repository

This repository includes both media files (available in medias/)
that will be retrieved from the web using medias/get_files.py and several
testsuites (available in testsuites/) to be used with gst-validate-launcher[1].

By default, gst-validate-launcher --sync will retrieve that repository to run
the default testsuite (namely validate and ges testsuites from testsuites/validate.py
and testsuites/ges.py)

For any USAGE documentation, you should refer to gst-validate documentation and
in particular to:

    $ gst-validate-launcher --help

Note that this repository uses [git-lfs] so you will need to install it before cloning.

[0] http://cgit.freedesktop.org/gstreamer/gst-devtools/
[1] https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-validate/html/gst-validate-launcher.html
[git-lfs] https://git-lfs.github.com/