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 <rsmith@brightsign.biz>
This commit is contained in:
Ray Smith 2024-03-04 13:43:20 +00:00 committed by Daniel Stone
parent 56d3ea128a
commit 875d4b1626
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}