playbin3: gapless playback of audio/video media often dropping
Follow up from #1672 (closed)
gst-play-1.0 --use-playbin3 --gapless https://cdn-staging.assets.onestream.live/131879/SampleVideo_360x240_2mb-studio_share_media_video-131879__8vmgcsikk1668156487110.mp4 https://cdn-staging.assets.onestream.live/131879/SampleVideo_360x240_2mb-studio_share_media_video-131879__8vmgcsikk1668156487110.mp4
The pipeline is sometimes working fine but often get stuck after the first iteration.
When failing, one buffer from the second iteration is late:
0:00:31.426296169 88408 0x7f0f5c06af00 DEBUG GST_PERFORMANCE gstbasesink.c:3134:gst_base_sink_is_too_late:<sink> buffer is too late 0:00:28.947595000 > 0:00:26.804999999
Then all the remaining ones are dropped upstream because of QoS:
0:00:29.254593718 95887 0x7f5b50011f00 WARN videodecoder gstvideodecoder.c:3668:gst_video_decoder_clip_and_push_buf:<avdec_h264-0> Dropping frame due to QoS. start:0:00:01.000000000 deadline:0:00:01.000000000 earliest_time:0:00:26.471129000
0:00:29.256234990 95887 0x7f5b50011f00 WARN videodecoder gstvideodecoder.c:3668:gst_video_decoder_clip_and_push_buf:<avdec_h264-0> Dropping frame due to QoS. start:0:00:01.066666666 deadline:0:00:01.066666666 earliest_time:0:00:26.471129000
(...)
Not sure yet where the race is exactly.
There is also likely another issue as the pipeline should not get stuck even with all those buffers dropped.
This is a regression introduced by 6bffbe28.
cc @bilboed