diff options
Diffstat (limited to 'src/gsttools/qgstreameraudioinputselector.cpp')
-rw-r--r-- | src/gsttools/qgstreameraudioinputselector.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/gsttools/qgstreameraudioinputselector.cpp b/src/gsttools/qgstreameraudioinputselector.cpp index 72d079cbc..3bf5538c2 100644 --- a/src/gsttools/qgstreameraudioinputselector.cpp +++ b/src/gsttools/qgstreameraudioinputselector.cpp @@ -124,24 +124,21 @@ void QGstreamerAudioInputSelector::updateAlsaDevices() } n = hints; - while (*n != NULL) { + while (*n != nullptr) { char *name = snd_device_name_get_hint(*n, "NAME"); char *descr = snd_device_name_get_hint(*n, "DESC"); char *io = snd_device_name_get_hint(*n, "IOID"); - if ((name != NULL) && (descr != NULL)) { - if ( io == NULL || qstrcmp(io,"Input") == 0 ) { + if ((name != nullptr) && (descr != nullptr)) { + if (io == nullptr || qstrcmp(io, "Input") == 0) { m_names.append(QLatin1String("alsa:")+QString::fromUtf8(name)); m_descriptions.append(QString::fromUtf8(descr)); } } - if (name != NULL) - free(name); - if (descr != NULL) - free(descr); - if (io != NULL) - free(io); + free(name); + free(descr); + free(io); n++; } snd_device_name_free_hint(hints); |