diff --git a/daemon/src/account.cpp b/daemon/src/account.cpp index 7a99629cd42b8bf6015f8e36c2e9cda8c2b39518..f5d75e273f35600051773f9e4507d04010bf6cbc 100644 --- a/daemon/src/account.cpp +++ b/daemon/src/account.cpp @@ -247,6 +247,21 @@ namespace { } } +vector<int> +Account::getDefaultAudioCodecs() +{ + vector<int> result; + result.push_back(0); + result.push_back(3); + result.push_back(8); + result.push_back(9); + result.push_back(110); + result.push_back(111); + result.push_back(112); + + return result; +} + vector<map<string, string> > Account::getActiveVideoCodecs() const { diff --git a/daemon/src/account.h b/daemon/src/account.h index 0d67a797f3ce603442c247d43f41f8c5269b29f3..fba2bbf54f731303cee48ee08d2a29c7cca90639 100644 --- a/daemon/src/account.h +++ b/daemon/src/account.h @@ -144,6 +144,8 @@ class Account : public Serializable { std::vector<std::map<std::string, std::string> > getActiveVideoCodecs() const; + static std::vector<int> getDefaultAudioCodecs(); + /* Accessor to data structures * @return The list that reflects the user's choice */ diff --git a/daemon/src/dbus/configurationmanager.cpp b/daemon/src/dbus/configurationmanager.cpp index 62deef0b26f2894442f38f12ee2b9cb142304d85..96da9af473450ceeec78f67d11d23ca0adfd3e93 100644 --- a/daemon/src/dbus/configurationmanager.cpp +++ b/daemon/src/dbus/configurationmanager.cpp @@ -218,8 +218,8 @@ std::vector<int32_t> ConfigurationManager::getActiveAudioCodecList(const std::st if (acc) return acc->getActiveAudioCodecs(); else { - ERROR("Could not find account %s", accountID.c_str()); - return std::vector<int32_t>(); + ERROR("Could not find account %s, returning default", accountID.c_str()); + return Account::getDefaultAudioCodecs(); } }