[FFmpeg-devel] [PATCH 3/9] ffplay: initialize audio and video pts drift
Marton Balint
cus at passwd.hu
Sun Oct 14 19:11:48 CEST 2012
This makes sensible audio and video clock values even before displaying the
first frame.
Signed-off-by: Marton Balint <cus at passwd.hu>
---
ffplay.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ffplay.c b/ffplay.c
index 5b031f6..1e42fc8 100644
--- a/ffplay.c
+++ b/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) {
--
1.7.10.4
More information about the ffmpeg-devel
mailing list