gboolean negotiated;
+ /* We need to know whether negotiate was called in order to decide
+ * whether we should store the input buffer as input meta in case
+ * negotiate() gets called from the subclass' handle_buffer() implementation,
+ * as negotiate() is where we instantiate header extensions.
+ */
+ gboolean negotiate_called;
+
gboolean delay_segment;
GstEvent *pending_segment;
goto not_negotiated;
if (rtpbasepayload->priv->source_info
- || rtpbasepayload->priv->header_exts->len > 0) {
+ || rtpbasepayload->priv->header_exts->len > 0
+ || !rtpbasepayload->priv->negotiate_called) {
/* Save a copy of meta (instead of taking an extra reference before
* handle_buffer) to make the meta available when allocating a output
* buffer. */
gst_caps_unref (templ);
out:
+ payload->priv->negotiate_called = TRUE;
if (!res)
gst_pad_mark_reconfigure (GST_RTP_BASE_PAYLOAD_SRCPAD (payload));
g_atomic_int_set (&rtpbasepayload->priv->notified_first_timestamp, 1);
priv->base_offset = GST_BUFFER_OFFSET_NONE;
priv->negotiated = FALSE;
+ priv->negotiate_called = FALSE;
gst_caps_replace (&rtpbasepayload->priv->subclass_srccaps, NULL);
gst_caps_replace (&rtpbasepayload->priv->sinkcaps, NULL);
break;