1
0
mirror of https://github.com/mpv-player/mpv synced 2025-04-11 04:01:31 +00:00

af_lavcac3enc: fix custom bitrates

Probably has been broken for ages.

(Not sure why anyone would use this feature, though.)
This commit is contained in:
wm4 2016-06-23 10:43:54 +02:00
parent b753c229f7
commit 31b73d5ca0

View File

@ -319,14 +319,15 @@ static int af_open(struct af_instance* af){
if (s->cfg_bit_rate) { if (s->cfg_bit_rate) {
int i; int i;
for (i = 0; i < 19; i++) { for (i = 0; i < 19; i++) {
if (ac3_bitrate_tab[i] == s->cfg_bit_rate) if (ac3_bitrate_tab[i] == s->cfg_bit_rate) {
s->bit_rate = ac3_bitrate_tab[i] * 1000;
break; break;
} }
}
if (i >= 19) { if (i >= 19) {
MP_WARN(af, "af_lavcac3enc unable set unsupported " MP_WARN(af, "af_lavcac3enc unable set unsupported "
"bitrate %d, use default bitrate (check manpage to see " "bitrate %d, use default bitrate (check manpage to see "
"supported bitrates).\n", s->cfg_bit_rate); "supported bitrates).\n", s->cfg_bit_rate);
s->cfg_bit_rate = 0;
} }
} }