rtpjitterbuffer test: Stop jitterbuffer before pads to avoid race

The teardown of the pads checks the refcount, but there are timers
inside the jitterbuffer that can push things, so if we're not lucky,
things could be pushed while the pads are being shut down. Putting the
jitterbuffer to NULL first avoids this.
This commit is contained in:
Olivier Crête 2018-12-13 19:16:11 -05:00 committed by Nicolas Dufresne
parent 3de2c28fc1
commit c6e8325945

View file

@ -168,6 +168,7 @@ cleanup_jitterbuffer (GstElement * jitterbuffer)
gst_pad_set_active (mysrcpad, FALSE);
gst_pad_set_active (mysinkpad, FALSE);
gst_element_set_state (jitterbuffer, GST_STATE_NULL);
gst_check_teardown_src_pad (jitterbuffer);
gst_check_teardown_sink_pad (jitterbuffer);
gst_check_teardown_element (jitterbuffer);