From 17ebfc7cb71ac562480ca9cb97e6c751e521ab2d Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 18 Aug 2023 09:27:36 +0200 Subject: [PATCH] rtmp2sink: fix crash if message conversion failed The message pointer is not set so we can't display it in logs. Part-of: --- subprojects/gst-plugins-bad/gst/rtmp2/gstrtmp2sink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/gst/rtmp2/gstrtmp2sink.c b/subprojects/gst-plugins-bad/gst/rtmp2/gstrtmp2sink.c index c93246e69f..f39bc43735 100644 --- a/subprojects/gst-plugins-bad/gst/rtmp2/gstrtmp2sink.c +++ b/subprojects/gst-plugins-bad/gst/rtmp2/gstrtmp2sink.c @@ -821,7 +821,7 @@ static GstFlowReturn gst_rtmp2_sink_render (GstBaseSink * sink, GstBuffer * buffer) { GstRtmp2Sink *self = GST_RTMP2_SINK (sink); - GstBuffer *message; + GstBuffer *message = NULL; GstFlowReturn ret; if (G_UNLIKELY (should_drop_header (self, buffer))) { @@ -833,7 +833,7 @@ gst_rtmp2_sink_render (GstBaseSink * sink, GstBuffer * buffer) if (G_UNLIKELY (!buffer_to_message (self, buffer, &message))) { GST_ELEMENT_ERROR (self, STREAM, FAILED, ("Failed to convert FLV to RTMP"), - ("Failed to convert %" GST_PTR_FORMAT, message)); + ("Failed to convert %" GST_PTR_FORMAT, buffer)); return GST_FLOW_ERROR; }