sctp: fix build with GST_DISABLE_GST_DEBUG

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1465>
This commit is contained in:
Sebastian Dröge 2020-08-07 09:26:19 +03:00 committed by Tim-Philipp Müller
parent 80a0da9698
commit 7ef393d5ff

View file

@ -174,6 +174,7 @@ gst_sctp_association_class_init (GstSctpAssociationClass * klass)
g_object_class_install_properties (gobject_class, NUM_PROPERTIES, properties);
}
#if defined(SCTP_DEBUG) && !defined(GST_DISABLE_GST_DEBUG)
#define USRSCTP_GST_DEBUG_LEVEL GST_LEVEL_DEBUG
static void
gst_usrsctp_debug (const gchar * format, ...)
@ -185,13 +186,18 @@ gst_usrsctp_debug (const gchar * format, ...)
__FILE__, GST_FUNCTION, __LINE__, NULL, format, varargs);
va_end (varargs);
}
#endif
static void
gst_sctp_association_init (GstSctpAssociation * self)
{
/* No need to lock mutex here as long as the function is only called from gst_sctp_association_get */
if (number_of_associations == 0) {
#if defined(SCTP_DEBUG) && !defined(GST_DISABLE_GST_DEBUG)
usrsctp_init (0, sctp_packet_out, gst_usrsctp_debug);
#else
usrsctp_init (0, sctp_packet_out, NULL);
#endif
/* Explicit Congestion Notification */
usrsctp_sysctl_set_sctp_ecn_enable (0);