Browse Source

avformat/riffde: Fix integer overflow in bitrate

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n2.8
Michael Niedermayer 10 years ago
parent
commit
839d6bc192
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavformat/riffdec.c

+ 2
- 2
libavformat/riffdec.c View File

@@ -99,13 +99,13 @@ int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb,
id = avio_rl16(pb);
codec->channels = avio_rl16(pb);
codec->sample_rate = avio_rl32(pb);
bitrate = avio_rl32(pb) * 8;
bitrate = avio_rl32(pb) * 8LL;
codec->block_align = avio_rl16(pb);
} else {
id = avio_rb16(pb);
codec->channels = avio_rb16(pb);
codec->sample_rate = avio_rb32(pb);
bitrate = avio_rb32(pb) * 8;
bitrate = avio_rb32(pb) * 8LL;
codec->block_align = avio_rb16(pb);
}
if (size == 14) { /* We're dealing with plain vanilla WAVEFORMAT */


Loading…
Cancel
Save