wasapi: Don't open the device in get_caps()
authorNirbheek Chauhan <nirbheek@centricular.com>
Mon, 9 Apr 2018 11:46:38 +0000 (17:16 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Mon, 9 Apr 2018 11:58:11 +0000 (17:28 +0530)
commitc427860a20866045bef130b9a3e576c9f6367c47
tree823db6760ce062d827516337e534de16d9db357d
parentb7653925db56cadbf7224e2310ab4408ade00f3d
wasapi: Don't open the device in get_caps()

We can just return the template caps till the device is opened when
going from READY -> PAUSED. This fixes a CRITICAL when calling
ELEMENT_ERROR before the ringbuffer is allocated.

Also fixes a couple of leaks in error conditions.

https://bugzilla.gnome.org/show_bug.cgi?id=794611
sys/wasapi/gstwasapisink.c
sys/wasapi/gstwasapisrc.c