tests: Avoid hang with decodebin test
authorEdward Hervey <edward@centricular.com>
Mon, 8 Jun 2020 06:11:00 +0000 (08:11 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Mon, 8 Jun 2020 06:11:00 +0000 (08:11 +0200)
commit78444fc62225bd1ea6f3ba172b4962b75327fcbe
treeb47f5ff7a743fc6a39ac1604069869c7518f8f67
parent9c3cff287e239d9fc68322d5b464adc1684e8216
tests: Avoid hang with decodebin test

When adding elements dynamically to a pipeline one should never guess what the
curren/target state is, and instead use `gst_element_sync_state_with_parent()`.

Fixes racy hang when running within valgrind

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/692>
tests/check/elements/decodebin.c