Commit c6e83259 authored by Olivier Crête's avatar Olivier Crête 👻 Committed by Nicolas Dufresne

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.
parent 3de2c28f
...@@ -168,6 +168,7 @@ cleanup_jitterbuffer (GstElement * jitterbuffer) ...@@ -168,6 +168,7 @@ cleanup_jitterbuffer (GstElement * jitterbuffer)
gst_pad_set_active (mysrcpad, FALSE); gst_pad_set_active (mysrcpad, FALSE);
gst_pad_set_active (mysinkpad, FALSE); gst_pad_set_active (mysinkpad, FALSE);
gst_element_set_state (jitterbuffer, GST_STATE_NULL);
gst_check_teardown_src_pad (jitterbuffer); gst_check_teardown_src_pad (jitterbuffer);
gst_check_teardown_sink_pad (jitterbuffer); gst_check_teardown_sink_pad (jitterbuffer);
gst_check_teardown_element (jitterbuffer); gst_check_teardown_element (jitterbuffer);
......
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