ffplay: reset external clock to unknown on start
authorMarton Balint <cus@passwd.hu>
Thu, 20 Dec 2012 23:32:18 +0000 (00:32 +0100)
committerMarton Balint <cus@passwd.hu>
Fri, 28 Dec 2012 19:01:00 +0000 (20:01 +0100)
Fixes a delay and initial frame drops on starting realtime streams with
external clock.

Signed-off-by: Marton Balint <cus@passwd.hu>
ffplay.c

index f9ea20d..5f4f111 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -2835,7 +2835,8 @@ static VideoState *stream_open(const char *filename, AVInputFormat *iformat)
 
     is->continue_read_thread = SDL_CreateCond();
 
-    update_external_clock_pts(is, 0.0);
+    //FIXME: use a cleaner way to signal obsolete external clock...
+    update_external_clock_pts(is, (double)AV_NOPTS_VALUE);
     update_external_clock_speed(is, 1.0);
     is->audio_current_pts_drift = -av_gettime() / 1000000.0;
     is->video_current_pts_drift = is->audio_current_pts_drift;