mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-27 01:42:20 +00:00
ffplay: initialize audio and video pts drift
This makes sensible audio and video clock values even before displaying the first frame. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
eaa91ed863
commit
66bb5b1bc9
2
ffplay.c
2
ffplay.c
@ -2677,6 +2677,8 @@ static VideoState *stream_open(const char *filename, AVInputFormat *iformat)
|
||||
|
||||
is->continue_read_thread = SDL_CreateCond();
|
||||
|
||||
is->audio_current_pts_drift = -av_gettime() / 1000000.0;
|
||||
is->video_current_pts_drift = is->audio_current_pts_drift;
|
||||
is->av_sync_type = av_sync_type;
|
||||
is->read_tid = SDL_CreateThread(read_thread, is);
|
||||
if (!is->read_tid) {
|
||||
|
Loading…
Reference in New Issue
Block a user