summaryrefslogtreecommitdiff
path: root/libavformat/xwma.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/xwma.c')
-rw-r--r--libavformat/xwma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/xwma.c b/libavformat/xwma.c
index ffe0bb7012..c467af9fac 100644
--- a/libavformat/xwma.c
+++ b/libavformat/xwma.c
@@ -278,7 +278,7 @@ static int xwma_read_header(AVFormatContext *s)
* the total duration using the average bits per sample and the
* total data length.
*/
- st->duration = (size<<3) * st->codecpar->sample_rate / st->codecpar->bit_rate;
+ st->duration = av_rescale((size<<3), st->codecpar->sample_rate, st->codecpar->bit_rate);
}
fail: