From 8c8bd150ad45da5331a899da96733d8506af87fe Mon Sep 17 00:00:00 2001 From: Wang Yu Date: Tue, 2 Jun 2026 19:58:51 +0800 Subject: [PATCH] sendspin: reject unsupported receive codecs Commit b1b565339 ("sendspin: negotiate the first raw format") says that FLAC and Opus are not supported yet. The receiver also only advertises PCM formats in its player support. Reject non-PCM stream/start codecs in the receiver. Otherwise parse_player() accepts FLAC or Opus without setting client->stride, while the receive path later uses client->stride as a raw frame size. Signed-off-by: Wang Yu --- src/modules/module-sendspin-recv.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/modules/module-sendspin-recv.c b/src/modules/module-sendspin-recv.c index 14f0f02b8..4e75e2fc5 100644 --- a/src/modules/module-sendspin-recv.c +++ b/src/modules/module-sendspin-recv.c @@ -753,16 +753,6 @@ static int parse_player(struct client *client, struct spa_json *player) return -EINVAL; } } - else if (spa_streq(codec, "opus")) { - client->info.media_subtype = SPA_MEDIA_SUBTYPE_opus; - client->info.info.opus.rate = sample_rate; - client->info.info.opus.channels = channels; - } - else if (spa_streq(codec, "flac")) { - client->info.media_subtype = SPA_MEDIA_SUBTYPE_flac; - client->info.info.flac.rate = sample_rate; - client->info.info.flac.channels = channels; - } else return -EINVAL;