summaryrefslogtreecommitdiff
path: root/libavformat/au.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-22 15:34:21 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-22 15:34:21 +0200
commit52fdaf27f7160990f0612c7b5f46592bf6410796 (patch)
treee5364aa9993a9365acfeef629802e7e1dc6868d9 /libavformat/au.c
parent8aa57b7b5e06c1cd9dbb2e84e48caa0ef840c5dc (diff)
audemux: Fix potential integer overflow leading to a division by 0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/au.c')
-rw-r--r--libavformat/au.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/au.c b/libavformat/au.c
index bec0d7641b..b66d559d3c 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -170,7 +170,7 @@ static int au_read_header(AVFormatContext *s)
st->codec->channels = channels;
st->codec->sample_rate = rate;
if (data_size != AU_UNKNOWN_SIZE)
- st->duration = (((int64_t)data_size)<<3) / (st->codec->channels * bps);
+ st->duration = (((int64_t)data_size)<<3) / (st->codec->channels * (int64_t)bps);
avpriv_set_pts_info(st, 64, 1, rate);
return 0;
}