gstreamer/subprojects/gst-integration-testsuites/testsuites/validate
Alicia Boya García 5fd3c8a16c 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/5021>
2023-07-26 19:14:43 +00:00
..
appsrc
aspectcropratio
baseparse test: update tests to include the new meta 2022-06-03 08:29:05 +00:00
clock_sync
dash streamcollection: Use upstream-id as name 2023-06-22 14:06:04 +02:00
decryptor gst-integration-testsuites: Update cenc_audio_esds_property_overrides expected output file 2022-12-17 19:30:51 +02:00
flow
flvdemux
h264 test: update tests to include the new meta 2022-06-03 08:29:05 +00:00
h265parse h265parse: Parse SEI unregistered user data 2023-07-25 18:28:26 +00:00
interlace
matroska
mp4 qtdemux: Fix premature EOS when some files are played in push mode 2023-07-26 19:14:43 +00:00
mse testsuites: rename mse validate tests 2023-03-17 10:48:10 +01:00
nle
playbin
playbin3 oggdemux: vp8: Detect keyframe packets 2023-05-31 06:30:48 +00:00
rtp
scaletempo
uridecodebin uridecodebin: Handle non dynamic sources with several source pads 2023-06-30 01:00:34 +00:00