From 580e06a002b135dc14b6bc9a41c79154a0c36444 Mon Sep 17 00:00:00 2001 From: Jochen Henneberg Date: Wed, 13 Nov 2024 08:16:10 +0100 Subject: [PATCH] fmp4mux: Let test consume remaining buffers after EOS Part-of: --- mux/fmp4/tests/tests.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mux/fmp4/tests/tests.rs b/mux/fmp4/tests/tests.rs index e012ebba..3803cf28 100644 --- a/mux/fmp4/tests/tests.rs +++ b/mux/fmp4/tests/tests.rs @@ -2757,8 +2757,10 @@ fn test_caps_change_at_gop_boundary_multi_stream() { assert_eq!(h1.upstream_events_in_queue(), 2); assert_eq!(h2.upstream_events_in_queue(), 1); + h1.crank_single_clock_wait().unwrap(); h1.push_event(gst::event::Eos::new()); h2.push_event(gst::event::Eos::new()); + test_caps_changed_verify(&mut h1, 1 + 1 + 8, true, false); assert_eq!(h1.buffers_in_queue(), 0); } @@ -2800,7 +2802,7 @@ fn test_caps_change_at_gop_boundary_chunked_multi_stream() { h2.set_src_caps(caps2); h2.play(); - for i in 0..21 { + for i in 0..19 { // caps change on 10th and 20th buffer if let Some(caps) = match i { 10 => Some( @@ -2903,8 +2905,11 @@ fn test_caps_change_at_gop_boundary_chunked_multi_stream() { // The first chunk of the new fragment test_caps_changed_verify(&mut h1, 1 + 1 + 8 + 9, true, false); + h1.crank_single_clock_wait().unwrap(); h1.push_event(gst::event::Eos::new()); h2.push_event(gst::event::Eos::new()); + // The final chunk from EOS + test_caps_changed_verify(&mut h1, 1 + 1 + 1, false, true); assert_eq!(h1.buffers_in_queue(), 0); }