From cfc8d414a9026746a65c95d38da39c9b64419968 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 17 Feb 2025 10:21:17 +0100 Subject: [PATCH] module-rtp: fix SSRC warnings Fix indentation and also suppress the SSRC warning for other formats than audio. --- src/modules/module-rtp/audio.c | 8 ++++---- src/modules/module-rtp/midi.c | 8 ++++++-- src/modules/module-rtp/opus.c | 8 ++++++-- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/modules/module-rtp/audio.c b/src/modules/module-rtp/audio.c index 3148083bd..de4d7ba7d 100644 --- a/src/modules/module-rtp/audio.c +++ b/src/modules/module-rtp/audio.c @@ -198,10 +198,10 @@ invalid_len: return -EINVAL; unexpected_ssrc: if (!impl->fixed_ssrc) { - /* We didn't have a configured SSRC, and there's more than one SSRC on - * this address/port pair */ - pw_log_warn("unexpected SSRC (expected %u != %u)", impl->ssrc, - hdr->ssrc); + /* We didn't have a configured SSRC, and there's more than one SSRC on + * this address/port pair */ + pw_log_warn("unexpected SSRC (expected %u != %u)", impl->ssrc, + hdr->ssrc); } return -EINVAL; } diff --git a/src/modules/module-rtp/midi.c b/src/modules/module-rtp/midi.c index 6e243e83a..1b7f9ad65 100644 --- a/src/modules/module-rtp/midi.c +++ b/src/modules/module-rtp/midi.c @@ -330,8 +330,12 @@ invalid_len: pw_log_warn("invalid RTP length"); return -EINVAL; unexpected_ssrc: - pw_log_warn("unexpected SSRC (expected %u != %u)", - impl->ssrc, hdr->ssrc); + if (!impl->fixed_ssrc) { + /* We didn't have a configured SSRC, and there's more than one SSRC on + * this address/port pair */ + pw_log_warn("unexpected SSRC (expected %u != %u)", + impl->ssrc, hdr->ssrc); + } return -EINVAL; } diff --git a/src/modules/module-rtp/opus.c b/src/modules/module-rtp/opus.c index 2288fc506..83857c80b 100644 --- a/src/modules/module-rtp/opus.c +++ b/src/modules/module-rtp/opus.c @@ -198,8 +198,12 @@ invalid_len: pw_log_warn("invalid RTP length"); return -EINVAL; unexpected_ssrc: - pw_log_warn("unexpected SSRC (expected %u != %u)", - impl->ssrc, hdr->ssrc); + if (!impl->fixed_ssrc) { + /* We didn't have a configured SSRC, and there's more than one SSRC on + * this address/port pair */ + pw_log_warn("unexpected SSRC (expected %u != %u)", + impl->ssrc, hdr->ssrc); + } return -EINVAL; }