mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
ffplay: fix updating external clock after seeking
Now it should work for the timestamp based and the byte based case as well. Also only update the external clock if the seeking was successful. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
fc38bbcd6a
commit
2efd01a32f
1 changed files with 6 additions and 1 deletions
7
ffplay.c
7
ffplay.c
|
|
@ -2669,8 +2669,13 @@ static int read_thread(void *arg)
|
|||
packet_queue_flush(&is->videoq);
|
||||
packet_queue_put(&is->videoq, &flush_pkt);
|
||||
}
|
||||
if (is->seek_flags & AVSEEK_FLAG_BYTE) {
|
||||
//FIXME: use a cleaner way to signal obsolete external clock...
|
||||
update_external_clock_pts(is, (double)AV_NOPTS_VALUE);
|
||||
} else {
|
||||
update_external_clock_pts(is, seek_target / (double)AV_TIME_BASE);
|
||||
}
|
||||
}
|
||||
update_external_clock_pts(is, (seek_target + ic->start_time) / (double)AV_TIME_BASE);
|
||||
is->seek_req = 0;
|
||||
eof = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue