[FFmpeg-cvslog] cafdec: fix seeking with adpcm

Michael Niedermayer git at videolan.org
Tue Nov 27 05:08:43 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Nov 27 04:33:25 2012 +0100| [8aa6d899c01f4aaa22698fa6cf66d4674ae4502c] | committer: Michael Niedermayer

cafdec: fix seeking with adpcm

Fixes Ticket1906

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8aa6d899c01f4aaa22698fa6cf66d4674ae4502c
---

 libavformat/cafdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index dbc351a..7fd9c6b 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;



More information about the ffmpeg-cvslog mailing list