Check the return value of gst_msdk_context_ensure_context and abort in case of failure. gstreamer/gst-plugins-bad#945