From eed2e9d52bed70b3faae371c6b9c829c7c925b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 9 Mar 2019 17:17:11 +0000 Subject: [PATCH] tests: audiodecoder: speed up audiodecoder_buffer_after_segment test We're creating buffers with one sample here for some reason. The actual value of the segment stop is irrelevant for what we're testing here, so lower it to 10ms so that we create fewer buffers which speeds things up on slow machines and in valgrind. --- tests/check/libs/audiodecoder.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/check/libs/audiodecoder.c b/tests/check/libs/audiodecoder.c index ef7aba526b..8f69f53208 100644 --- a/tests/check/libs/audiodecoder.c +++ b/tests/check/libs/audiodecoder.c @@ -610,17 +610,19 @@ GST_START_TEST (audiodecoder_buffer_after_segment) guint64 i; GstClockTime pos; +#define SEGMENT_STOP (GST_MSECOND * 10) + GstHarness *h = setup_audiodecodertester (NULL, NULL); /* push a new segment */ gst_segment_init (&segment, GST_FORMAT_TIME); - segment.stop = GST_SECOND; + segment.stop = SEGMENT_STOP; fail_unless (gst_harness_push_event (h, gst_event_new_segment (&segment))); /* push buffers, the data is actually a number so we can track them */ i = 0; pos = 0; - while (pos < GST_SECOND) { + while (pos < SEGMENT_STOP) { GstMapInfo map; guint64 num;