mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
avcodec/ac3_parser: Avoid floats in bitrate computation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
061a592b9c
commit
f86e7c5d00
@ -140,8 +140,8 @@ int avpriv_ac3_parse_header2(GetBitContext *gbc, AC3HeaderInfo **phdr)
|
|||||||
hdr->channel_mode = get_bits(gbc, 3);
|
hdr->channel_mode = get_bits(gbc, 3);
|
||||||
hdr->lfe_on = get_bits1(gbc);
|
hdr->lfe_on = get_bits1(gbc);
|
||||||
|
|
||||||
hdr->bit_rate = (uint32_t)(8.0 * hdr->frame_size * hdr->sample_rate /
|
hdr->bit_rate = 8LL * hdr->frame_size * hdr->sample_rate /
|
||||||
(hdr->num_blocks * 256.0));
|
(hdr->num_blocks * 256);
|
||||||
hdr->channels = ff_ac3_channels_tab[hdr->channel_mode] + hdr->lfe_on;
|
hdr->channels = ff_ac3_channels_tab[hdr->channel_mode] + hdr->lfe_on;
|
||||||
}
|
}
|
||||||
hdr->channel_layout = avpriv_ac3_channel_layout_tab[hdr->channel_mode];
|
hdr->channel_layout = avpriv_ac3_channel_layout_tab[hdr->channel_mode];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user