Commit 839d6bc1 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/riffde: Fix integer overflow in bitrate

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent cd326377
...@@ -99,13 +99,13 @@ int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb, ...@@ -99,13 +99,13 @@ int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb,
id = avio_rl16(pb); id = avio_rl16(pb);
codec->channels = avio_rl16(pb); codec->channels = avio_rl16(pb);
codec->sample_rate = avio_rl32(pb); codec->sample_rate = avio_rl32(pb);
bitrate = avio_rl32(pb) * 8; bitrate = avio_rl32(pb) * 8LL;
codec->block_align = avio_rl16(pb); codec->block_align = avio_rl16(pb);
} else { } else {
id = avio_rb16(pb); id = avio_rb16(pb);
codec->channels = avio_rb16(pb); codec->channels = avio_rb16(pb);
codec->sample_rate = avio_rb32(pb); codec->sample_rate = avio_rb32(pb);
bitrate = avio_rb32(pb) * 8; bitrate = avio_rb32(pb) * 8LL;
codec->block_align = avio_rb16(pb); codec->block_align = avio_rb16(pb);
} }
if (size == 14) { /* We're dealing with plain vanilla WAVEFORMAT */ if (size == 14) { /* We're dealing with plain vanilla WAVEFORMAT */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment