mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-06-07 03:01:36 -04:00
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 <wangyu@uniontech.com>
This commit is contained in:
parent
1a1cd8d743
commit
8c8bd150ad
1 changed files with 0 additions and 10 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue