audioconvert: avoid crash on 64 channels + monitor enabled

this->monitor enabled adds an additional port in reconfigure_mode. If
there was already the maximum 64, this will crash.

Make maximum number of ports one larger than max channels to avoid
problems.
This commit is contained in:
Pauli Virtanen 2022-06-21 23:08:03 +03:00 committed by Wim Taymans
parent 0f62d3442c
commit 6bfe9a362c
2 changed files with 5 additions and 3 deletions

View file

@ -43,7 +43,7 @@ SPA_LOG_IMPL(logger);
extern const struct spa_handle_factory test_source_factory;
#define MAX_PORTS SPA_AUDIO_MAX_CHANNELS
#define MAX_PORTS (SPA_AUDIO_MAX_CHANNELS+1)
struct context {
struct spa_handle *convert_handle;