From 497b3da14d083811b5008fcdf43a54ab937b4f28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 15 Apr 2022 19:55:34 +0300 Subject: [PATCH] rtpbasepayload: Don't write header extensions if there's no corresponding input buffer for the packet The GstRTPHeaderExtension API requires the input buffer to exist. This can happen if the output packet is generated e.g. from a caps or tags event like in the case for rtpgstpay. Part-of: --- .../gst-plugins-base/gst-libs/gst/rtp/gstrtpbasepayload.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/rtp/gstrtpbasepayload.c b/subprojects/gst-plugins-base/gst-libs/gst/rtp/gstrtpbasepayload.c index fc2fda5514..2c5728e711 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/rtp/gstrtpbasepayload.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/rtp/gstrtpbasepayload.c @@ -1718,7 +1718,8 @@ set_headers (GstBuffer ** buffer, guint idx, gpointer user_data) gst_rtp_buffer_set_timestamp (&rtp, data->rtptime); GST_OBJECT_LOCK (data->payload); - if (data->payload->priv->header_exts->len > 0) { + if (data->payload->priv->header_exts->len > 0 + && data->payload->priv->input_meta_buffer) { guint wordlen; gsize extlen; guint16 bit_pattern;