srt: post error when failing to start

... as appropriate for a subsequent state change failure
This commit is contained in:
Mark Nauwelaerts 2019-04-21 17:17:14 +02:00
parent 6d9398e87f
commit 7aba64e19d
2 changed files with 6 additions and 2 deletions

View file

@ -155,7 +155,9 @@ gst_srt_sink_start (GstBaseSink * bsink)
}
if (!ret) {
GST_WARNING_OBJECT (self, "Failed to open SRT: %s", error->message);
/* ensure error is posted since state change will fail */
GST_ELEMENT_ERROR (self, RESOURCE, OPEN_WRITE, (NULL),
("Failed to open SRT: %s", error->message));
g_clear_error (&error);
}

View file

@ -114,7 +114,9 @@ gst_srt_src_start (GstBaseSrc * bsrc)
}
if (!ret) {
GST_WARNING_OBJECT (self, "Failed to open SRT: %s", error->message);
/* ensure error is posted since state change will fail */
GST_ELEMENT_ERROR (self, RESOURCE, OPEN_READ, (NULL),
("Failed to open SRT: %s", error->message));
g_clear_error (&error);
}