X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fcafdec.c;h=7fd9c6b8d13aa038079d2adb710afbfd34fbb855;hb=2d9d4440519f22c092ac37ccd1a1a914564d00b5;hp=dbc351a5889a4658e8631b28a63e7d377d99287f;hpb=a9cfbf6d4b08a8b4ceb610f08f1cc232b090ba8f;p=ffmpeg diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c index dbc351a5889..7fd9c6b8d13 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;