Fix build of toc2mp3 after update of audio/lame to version 3.100.

PR:	225038
This commit is contained in:
Marius Strobl 2018-01-11 21:42:20 +00:00
parent 408baf5221
commit a4b1bf5539
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=458797

View File

@ -0,0 +1,24 @@
--- utils/toc2mp3.cc.orig 2003-02-22 10:16:56 UTC
+++ utils/toc2mp3.cc
@@ -143,8 +143,8 @@ static void printUsage()
message(0, "LAME encoder version: %s", get_lame_version());
message(0, "Supported bit rates: ");
- for (int i = 0; i < 16 && bitrate_table[1][i] >= 0; i++) {
- message(0, "%d ", bitrate_table[1][i]);
+ for (int br, i = 0; (br = lame_get_bitrate(1, i)) >= 0; i++) {
+ message(0, "%d ", br);
}
message(0, "");
}
@@ -238,8 +238,8 @@ lame_global_flags *init_encoder(int bitr
lame_global_flags *lf;
int bitrateOk = 0;
- for (int i = 0; bitrate_table[1][i] >= 0 && !bitrateOk; i++) {
- if (bitrate == bitrate_table[1][i])
+ for (int br, i = 0; (br = lame_get_bitrate(1, i)) >= 0 && !bitrateOk; i++) {
+ if (br == bitrate)
bitrateOk = 1;
}