aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/cafdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-27 04:33:25 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-27 05:03:24 +0100
commit8aa6d899c01f4aaa22698fa6cf66d4674ae4502c (patch)
tree2e61a8581f4a2a9ca9b16ecdaa6e8bbcad185fb7 /libavformat/cafdec.c
parent16ef48c37fadb251a76dac8e000be5caa6ffd25f (diff)
downloadffmpeg-8aa6d899c01f4aaa22698fa6cf66d4674ae4502c.tar.gz
cafdec: fix seeking with adpcm
Fixes Ticket1906 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/cafdec.c')
-rw-r--r--libavformat/cafdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index dbc351a588..7fd9c6b8d1 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -401,7 +401,7 @@ static int read_seek(AVFormatContext *s, int stream_index,
if (caf->frames_per_packet > 0 && caf->bytes_per_packet > 0) {
/* calculate new byte position based on target frame position */
- pos = caf->bytes_per_packet * timestamp / caf->frames_per_packet;
+ pos = caf->bytes_per_packet * (timestamp / caf->frames_per_packet);
if (caf->data_size > 0)
pos = FFMIN(pos, caf->data_size);
packet_cnt = pos / caf->bytes_per_packet;