mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
cafdec: fix seeking with adpcm
Fixes Ticket1906 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
16ef48c37f
commit
8aa6d899c0
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user