UI: Fix audio ids not being stored properly

Audio ids were being stored in a map with const char pointers, thus they
were destroyed when call_once finished. To fix this, store std::strings
instead.
This commit is contained in:
jp9000
2022-03-13 07:04:11 -07:00
parent 2a991a4fa0
commit 02e5410381
3 changed files with 9 additions and 8 deletions

View File

@@ -277,8 +277,9 @@ static void PopulateAACBitrates(initializer_list<QComboBox *> boxes)
vector<pair<QString, QString>> pairs;
for (auto &entry : bitrateMap)
pairs.emplace_back(QString::number(entry.first),
obs_encoder_get_display_name(entry.second));
pairs.emplace_back(
QString::number(entry.first),
obs_encoder_get_display_name(entry.second.c_str()));
for (auto box : boxes) {
QString currentText = box->currentText();