rtpredenc: quieten warning about ignoring header extensions
authorMathieu Duponchelle <mathieu@centricular.com>
Fri, 22 Apr 2022 23:57:53 +0000 (01:57 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sat, 23 Apr 2022 01:04:54 +0000 (01:04 +0000)
Turn it into a FIXME, and only log once

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2279>

subprojects/gst-plugins-good/gst/rtp/gstrtpredenc.c
subprojects/gst-plugins-good/gst/rtp/gstrtpredenc.h

index bd42187..7f234bc 100644 (file)
@@ -157,8 +157,11 @@ _alloc_red_packet_and_fill_headers (GstRtpRedEnc * self,
     g_assert_not_reached ();
 
   /* Copying RTP header of incoming packet */
-  if (gst_rtp_buffer_get_extension (inp_rtp))
-    GST_WARNING_OBJECT (self, "FIXME: Ignoring RTP extension");
+  if (gst_rtp_buffer_get_extension (inp_rtp)
+      && !self->ignoring_extension_warned) {
+    GST_FIXME_OBJECT (self, "Ignoring RTP extension");
+    self->ignoring_extension_warned = TRUE;
+  }
 
   gst_rtp_buffer_set_marker (&red_rtp, gst_rtp_buffer_get_marker (inp_rtp));
   gst_rtp_buffer_set_payload_type (&red_rtp, self->pt);
@@ -475,6 +478,7 @@ gst_rtp_red_enc_init (GstRtpRedEnc * self)
   self->allow_no_red_blocks = DEFAULT_ALLOW_NO_RED_BLOCKS;
   self->num_sent = 0;
   self->rtp_history = g_queue_new ();
+  self->ignoring_extension_warned = FALSE;
 }
 
 
index 342bf15..848aeea 100644 (file)
@@ -57,6 +57,8 @@ struct _GstRtpRedEnc {
   gboolean send_caps;
   gboolean is_current_caps_red;
   guint8 twcc_ext_id;
+
+  gboolean ignoring_extension_warned;
 };
 
 GType gst_rtp_red_enc_get_type (void);