wpesrc: Don't crash if WPE doesn't generate a buffer.
authorJan Schmidt <jan@centricular.com>
Mon, 24 Aug 2020 15:57:55 +0000 (01:57 +1000)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 21 Sep 2020 16:39:57 +0000 (16:39 +0000)
commit6fc7455881b5d9bf2e432e1a532377601be8946d
treebdd675dc2b125070da136b78c8fb95774146bd9b
parentc3659cd61194e9c68c5b56e526f025f3e01ef87f
wpesrc: Don't crash if WPE doesn't generate a buffer.

On creating a 2nd wpesrc in a new pipeline in an app that already
has a runnig wpesrc, WPE sometimes doesn't return a buffer on request,
leading to a crash. This commit fixes the crash, but not the underlying
failure - a 2nd wpesrc can still error out instead.

Partially fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1386

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1568>
ext/wpe/gstwpesrc.cpp