]> code.delx.au - pulseaudio/blobdiff - src/modules/bluetooth/module-bluez4-device.c
Add pa_channels_valid()
[pulseaudio] / src / modules / bluetooth / module-bluez4-device.c
index f419cb9f351e4d0d40d365883526bd36ed61ffa2..83e603fcbe834f2d842fd4f5a4a98400ecd1673c 100644 (file)
@@ -2463,7 +2463,7 @@ int pa__init(pa_module *m) {
 
     channels = u->sample_spec.channels;
     if (pa_modargs_get_value_u32(ma, "channels", &channels) < 0 ||
-        channels <= 0 || channels > PA_CHANNELS_MAX) {
+        !pa_channels_valid(channels)) {
         pa_log_error("Failed to get channels from module arguments");
         goto fail;
     }