From 875d4b162674417e3d5b189fe849b7bbe16a4eab Mon Sep 17 00:00:00 2001 From: Ray Smith Date: Mon, 4 Mar 2024 13:43:20 +0000 Subject: [PATCH] remoting: Handle non-fatal errors in gst_parse_launch gst_parse_launch can return non-NULL even though an error is set. This indicates "a recoverable parsing error and you can try to play the pipeline", however given that we don't (and likely can't) make any attempt to correct the situation, we should treat this as fatal and not try to carry on. Signed-off-by: Ray Smith --- remoting/remoting-plugin.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/remoting/remoting-plugin.c b/remoting/remoting-plugin.c index b517ee70..86830c07 100644 --- a/remoting/remoting-plugin.c +++ b/remoting/remoting-plugin.c @@ -211,10 +211,12 @@ remoting_gst_pipeline_init(struct remoted_output *output) weston_log("GST pipeline: %s\n", output->gst_pipeline); output->pipeline = gst_parse_launch(output->gst_pipeline, &err); - if (!output->pipeline) { + if (!output->pipeline || err) { weston_log("Could not create gstreamer pipeline. Error: %s\n", err->message); g_error_free(err); + if (output->pipeline) + goto err; return -1; }