alsa-compress-offload-sink: Miscellaneous clean up

- Fix typo
- Fix index check in port_enum_formats()
This commit is contained in:
Carlos Rafael Giani 2022-11-28 18:36:06 +01:00 committed by Wim Taymans
parent 59ad6c26aa
commit 293ba8aee3

View file

@ -57,7 +57,7 @@
#include <tinycompress/tinycompress.h> #include <tinycompress/tinycompress.h>
/* /*
* This creates a Pipewire sink node which uses the tinycompress user space * This creates a PipeWire sink node which uses the tinycompress user space
* library to use the ALSA Compress-Offload API for writing compressed data * library to use the ALSA Compress-Offload API for writing compressed data
* like MP3, FLAC etc. to an DSP that can handle such data directly. * like MP3, FLAC etc. to an DSP that can handle such data directly.
* *
@ -463,7 +463,7 @@ port_enum_formats(struct impl *this,
struct spa_audio_info info; struct spa_audio_info info;
uint32_t codec; uint32_t codec;
if (index > this->num_codecs) if (index >= this->num_codecs)
return 0; return 0;
codec = this->codecs_supported[index]; codec = this->codecs_supported[index];