From: Jonny Lamb Date: Mon, 17 Dec 2018 18:04:37 +0000 (+0000) Subject: rtpulpfec: stop and start the harness when setting error-after X-Git-Tag: 1.19.3~509^2~1272 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a3e8ad2d7b12446ba92307b15779fa9fe819bac;p=platform%2Fupstream%2Fgstreamer.git rtpulpfec: stop and start the harness when setting error-after gstreamer!55 makes some changes to how the `error-after` counter works which breaks this test. This change makes the test not rely on the ability to alter `error-after` at runtime and explicitly stops and starts the harness before pushing data. An alternative would be to add another argument to `harness_rtpulpfecdec` to set `error-after` on construction but that's slightly more long-winded. so I went for this approach instead. Fixes #532, even though that's already closed. --- diff --git a/tests/check/elements/rtpulpfec.c b/tests/check/elements/rtpulpfec.c index 57de5cd..f5f9e86 100644 --- a/tests/check/elements/rtpulpfec.c +++ b/tests/check/elements/rtpulpfec.c @@ -515,7 +515,12 @@ GST_START_TEST (rtpulpfecdec_recovered_push_failed) GstHarness *h = harness_rtpulpfecdec (3536077562, 100, 123); RecoveredPacketInfo info = {.pt = 100,.ssrc = 3536077562,.seq = 36921 }; GList *expected = expect_recovered_packets (h, &info, 1); + + // the harness is already PLAYING because there are no src pads, which + // means the error-after counter isn't set, so reset and start again. + gst_element_set_state (h->element, GST_STATE_NULL); gst_harness_set (h, "identity", "error-after", 2, NULL); + gst_harness_play (h); push_data (h, SAMPLE_ULPFEC0_FEC, sizeof (SAMPLE_ULPFEC0_FEC) - 1); push_lost_event (h, 36921, 1111, 2222, FALSE);