From fa070d20cf6a5dbdbf97c4ec8a8773e6c693b2dc Mon Sep 17 00:00:00 2001 From: =?utf8?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: --- subprojects/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 fc2fda5..2c5728e 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; -- 2.7.4