Browse Source

UI: Fix advanced audio encoder bitrate always set to 192

Audio bitrate maps needs to be populated while finding closest available
bitrate

Not populating makes always fallback to 192
tytan652 2 years ago
parent
commit
2b4ef6d6ea
1 changed files with 2 additions and 0 deletions
  1. 2 0
      UI/audio-encoders.cpp

+ 2 - 0
UI/audio-encoders.cpp

@@ -388,6 +388,8 @@ const std::vector<int> &GetAudioEncoderBitrates(const char *id)
 
 
 int FindClosestAvailableAudioBitrate(const char *id, int bitrate)
 int FindClosestAvailableAudioBitrate(const char *id, int bitrate)
 {
 {
+	PopulateBitrateLists();
+
 	int prev = 0;
 	int prev = 0;
 	int next = INVALID_BITRATE;
 	int next = INVALID_BITRATE;
 	std::string encoder = id;
 	std::string encoder = id;