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.
This commit is contained in:
Tim-Philipp Müller 2019-03-09 17:17:11 +00:00
parent a35d500eae
commit eed2e9d52b

View file

@ -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;