Commit 66bb5b1b authored by Marton Balint's avatar Marton Balint

ffplay: initialize audio and video pts drift

This makes sensible audio and video clock values even before displaying the
first frame.
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent eaa91ed8
...@@ -2677,6 +2677,8 @@ static VideoState *stream_open(const char *filename, AVInputFormat *iformat) ...@@ -2677,6 +2677,8 @@ static VideoState *stream_open(const char *filename, AVInputFormat *iformat)
is->continue_read_thread = SDL_CreateCond(); 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->av_sync_type = av_sync_type;
is->read_tid = SDL_CreateThread(read_thread, is); is->read_tid = SDL_CreateThread(read_thread, is);
if (!is->read_tid) { if (!is->read_tid) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment