Commit b2a88509 authored by Marton Balint's avatar Marton Balint

ffplay: only check external clock if current frame serial matches the displayed frame serial

This way we avoid updating the external clocks with timestamps beloging to
frames before seek.
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 2a4c7e65
......@@ -1190,6 +1190,7 @@ static void update_video_pts(VideoState *is, double pts, int64_t pos, int serial
is->video_current_pts_drift = is->video_current_pts - time;
is->video_current_pos = pos;
is->frame_last_pts = pts;
if (is->videoq.serial == serial)
check_external_clock_sync(is, is->video_current_pts);
}
......@@ -2150,6 +2151,7 @@ static void sdl_audio_callback(void *opaque, Uint8 *stream, int len)
/* Let's assume the audio driver that is used by SDL has two periods. */
is->audio_current_pts = is->audio_clock - (double)(2 * is->audio_hw_buf_size + is->audio_write_buf_size) / bytes_per_sec;
is->audio_current_pts_drift = is->audio_current_pts - audio_callback_time / 1000000.0;
if (is->audioq.serial == is->audio_pkt_temp_serial)
check_external_clock_sync(is, is->audio_current_pts);
}
......
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