Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mux
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2023-02-09 21:36:44 +0300
committerSebastian Dröge <sebastian@centricular.com>2023-02-09 21:36:44 +0300
commit4d9b6c54725ceb1494674743d54f88fdb3dce7f0 (patch)
tree8f5667da76a63d22fb62d4d286da89aaf87e2e68 /mux
parent5965ff43649a512c4cf1ab4a183ebcd06d7c1ff5 (diff)
fmp4mux: Pass one more buffer in test_buffer_multi_stream_short_gops test
This works around non-determinism in aggregator where depending on timing it can happen that it consumes all buffers from both pads or waits for another buffer on one pad while the other one already has one. The effect in this test was that it sometimes timed out. By providing one more buffer it is guaranteed now that at this point the muxer is beyond the end of the first fragment. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1081>
Diffstat (limited to 'mux')
-rw-r--r--mux/fmp4/tests/tests.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/mux/fmp4/tests/tests.rs b/mux/fmp4/tests/tests.rs
index 9af83898d..ac59e3779 100644
--- a/mux/fmp4/tests/tests.rs
+++ b/mux/fmp4/tests/tests.rs
@@ -1138,8 +1138,8 @@ fn test_buffer_multi_stream_short_gops() {
let output_offset = (60 * 60 * 1000).seconds();
- // Push 8 buffers of 1s each, 1st, 4th and 7th buffer without DELTA_UNIT flag
- for i in 0..8 {
+ // Push 9 buffers of 1s each, 1st, 4th and 7th buffer without DELTA_UNIT flag
+ for i in 0..9 {
let mut buffer = gst::Buffer::with_size(1).unwrap();
{
let buffer = buffer.get_mut().unwrap();
@@ -1161,7 +1161,7 @@ fn test_buffer_multi_stream_short_gops() {
}
assert_eq!(h2.push(buffer), Ok(gst::FlowSuccess::Ok));
- if i == 2 || i == 7 {
+ if i == 2 || i == 8 {
let ev = loop {
let ev = h1.pull_upstream_event().unwrap();
if ev.type_() != gst::EventType::Reconfigure
@@ -1254,12 +1254,12 @@ fn test_buffer_multi_stream_short_gops() {
assert_eq!(fragment_header.flags(), gst::BufferFlags::HEADER);
assert_eq!(fragment_header.pts(), Some(3.seconds() + output_offset));
assert_eq!(fragment_header.dts(), Some(3.seconds() + output_offset));
- assert_eq!(fragment_header.duration(), Some(5.seconds()));
+ assert_eq!(fragment_header.duration(), Some(6.seconds()));
- for i in 3..8 {
+ for i in 3..9 {
for j in 0..2 {
let buffer = h1.pull().unwrap();
- if i == 7 && j == 1 {
+ if i == 8 && j == 1 {
assert_eq!(
buffer.flags(),
gst::BufferFlags::DELTA_UNIT | gst::BufferFlags::MARKER