From f6e8b88128fbb287a627521c914d5ec453838ed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Javier=20Vel=C3=A1zquez-Garc=C3=ADa?= Date: Wed, 9 Oct 2024 12:32:34 -0400 Subject: [PATCH] srtsink: Add guard for null error when SRT open fails Part-of: --- subprojects/gst-plugins-bad/ext/srt/gstsrtsink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/ext/srt/gstsrtsink.c b/subprojects/gst-plugins-bad/ext/srt/gstsrtsink.c index a2ab8863ef..b2277a1314 100644 --- a/subprojects/gst-plugins-bad/ext/srt/gstsrtsink.c +++ b/subprojects/gst-plugins-bad/ext/srt/gstsrtsink.c @@ -155,7 +155,7 @@ gst_srt_sink_start (GstBaseSink * bsink) if (!ret) { /* ensure error is posted since state change will fail */ GST_ELEMENT_ERROR (self, RESOURCE, OPEN_WRITE, (NULL), - ("Failed to open SRT: %s", error->message)); + ("Failed to open SRT: %s", error ? error->message : "Unknown error")); g_clear_error (&error); }