diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-29 12:59:35 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-29 12:59:35 +0200 |
commit | f86e7c5d00cc426833c838f6ec6051d411a8bf80 (patch) | |
tree | b9c033402e885884a9942b400bb29459ddefa397 /libavcodec/ac3_parser.c | |
parent | 061a592b9cb0071d624d230ddb5d00a640df05d1 (diff) | |
download | ffmpeg-f86e7c5d00cc426833c838f6ec6051d411a8bf80.tar.gz |
avcodec/ac3_parser: Avoid floats in bitrate computation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ac3_parser.c')
-rw-r--r-- | libavcodec/ac3_parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c index 131e180360..678f08d2d7 100644 --- a/libavcodec/ac3_parser.c +++ b/libavcodec/ac3_parser.c @@ -140,8 +140,8 @@ int avpriv_ac3_parse_header2(GetBitContext *gbc, AC3HeaderInfo **phdr) hdr->channel_mode = get_bits(gbc, 3); hdr->lfe_on = get_bits1(gbc); - hdr->bit_rate = (uint32_t)(8.0 * hdr->frame_size * hdr->sample_rate / - (hdr->num_blocks * 256.0)); + hdr->bit_rate = 8LL * hdr->frame_size * hdr->sample_rate / + (hdr->num_blocks * 256); hdr->channels = ff_ac3_channels_tab[hdr->channel_mode] + hdr->lfe_on; } hdr->channel_layout = avpriv_ac3_channel_layout_tab[hdr->channel_mode]; |