[FFmpeg-cvslog] ffplay: initialize audio and video pts drift

Marton Balint git at videolan.org
Sun Oct 21 19:02:12 CEST 2012


ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sat Oct  6 19:42:42 2012 +0200| [66bb5b1bc9b1e8e856ca20b402f968d621e7eed2] | committer: 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: Marton Balint <cus at passwd.hu>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=66bb5b1bc9b1e8e856ca20b402f968d621e7eed2
---

 ffplay.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/ffplay.c b/ffplay.c
index 5c5126b..917883e 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) {



More information about the ffmpeg-cvslog mailing list