Commit 6acd66e7 authored by Mathieu Duponchelle's avatar Mathieu Duponchelle 🐸

tests: remove queues introducing raciness in flvmux test


GST_CHECKS=test_incrementing_timestamps meson test elements_flvmux \
-C build --repeat 10000

Unexpected critical/warning: gst_clock_id_unref: assertion 'id != NULL' failed

What I observed is that between the call to
test_clock_wait_next_pending_id and test_clock_process_next_id,
the clock entry was unscheduled by gst_aggregator_pad_chain_internal.

Removing the queues before flvmux preserve the intention of the test,
but makes it deterministic by making sure buffers are pushed on the
test thread.

I can also observe a SIGSEGV every once in a while but it doesn't
seem related.
parent 172d14ac
Pipeline #12170 passed with stages
in 27 minutes and 54 seconds
......@@ -784,8 +784,7 @@ typedef struct
GST_START_TEST (test_incrementing_timestamps)
GstPad *audio_sink, *video_sink, *audio_src, *video_src;
GstHarness *h, *audio, *video, *audio_q, *video_q;
GstHarness *h, *audio, *video;
GstTestClock *tclock;
guint i;
guint32 prev_pts;
......@@ -801,26 +800,14 @@ GST_START_TEST (test_incrementing_timestamps)
h = gst_harness_new_with_padnames ("flvmux", NULL, "src");
audio = gst_harness_new_with_element (h->element, "audio", NULL);
video = gst_harness_new_with_element (h->element, "video", NULL);
audio_q = gst_harness_new ("queue");
video_q = gst_harness_new ("queue");
audio_sink = GST_PAD_PEER (audio->srcpad);
video_sink = GST_PAD_PEER (video->srcpad);
audio_src = GST_PAD_PEER (audio_q->sinkpad);
video_src = GST_PAD_PEER (video_q->sinkpad);
gst_pad_unlink (audio->srcpad, audio_sink);
gst_pad_unlink (video->srcpad, video_sink);
gst_pad_unlink (audio_src, audio_q->sinkpad);
gst_pad_unlink (video_src, video_q->sinkpad);
gst_pad_link (audio_src, audio_sink);
gst_pad_link (video_src, video_sink);
g_object_set (h->element, "streamable", TRUE, NULL);
gst_harness_set_src_caps_str (audio_q,
gst_harness_set_src_caps_str (audio,
"audio/mpeg, mpegversion=(int)4, "
"rate=(int)44100, channels=(int)1, "
"stream-format=(string)raw, codec_data=(buffer)1208");
gst_harness_set_src_caps_str (video_q,
gst_harness_set_src_caps_str (video,
"video/x-h264, stream-format=(string)avc, alignment=(string)au, "
......@@ -836,9 +823,9 @@ GST_START_TEST (test_incrementing_timestamps)
gst_test_clock_set_time (tclock, now);
if (d->media_type == AUDIO)
gst_harness_push (audio_q, buf);
gst_harness_push (audio, buf);
gst_harness_push (video_q, buf);
gst_harness_push (video, buf);
gst_test_clock_wait_for_next_pending_id (tclock, &pending);
res = gst_test_clock_process_next_clock_id (tclock);
......@@ -871,8 +858,6 @@ GST_START_TEST (test_incrementing_timestamps)
gst_harness_teardown (h);
gst_harness_teardown (audio);
gst_harness_teardown (video);
gst_harness_teardown (audio_q);
gst_harness_teardown (video_q);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment