[FFmpeg-cvslog] r21586 - trunk/ffplay.c

michael subversion
Mon Feb 1 12:30:31 CET 2010


Author: michael
Date: Mon Feb  1 12:30:31 2010
New Revision: 21586

Log:
Schedule refreshes from a thread that actually knows the PTS.
Fixes wernfried_1.avi

Modified:
   trunk/ffplay.c

Modified: trunk/ffplay.c
==============================================================================
--- trunk/ffplay.c	Mon Feb  1 11:55:51 2010	(r21585)
+++ trunk/ffplay.c	Mon Feb  1 12:30:31 2010	(r21586)
@@ -1061,8 +1061,7 @@ static void video_refresh_timer(void *op
 
     if (is->video_st) {
         if (is->pictq_size == 0) {
-            /* if no picture, need to wait */
-            schedule_refresh(is, 1);
+//            fprintf(stderr, "Internal error detected in the SDL timer\n");
         } else {
             /* dequeue the picture */
             vp = &is->pictq[is->pictq_rindex];
@@ -1071,9 +1070,6 @@ static void video_refresh_timer(void *op
             is->video_current_pts = vp->pts;
             is->video_current_pts_drift = is->video_current_pts - av_gettime() / 1000000.0;
 
-            /* launch timer for next picture */
-            schedule_refresh(is, (int)(compute_frame_delay(vp->pts, is) * 1000 + 0.5));
-
             if(is->subtitle_st) {
                 if (is->subtitle_stream_changed) {
                     SDL_LockMutex(is->subpq_mutex);
@@ -1282,6 +1278,7 @@ static int queue_picture(VideoState *is,
         SDL_LockMutex(is->pictq_mutex);
         is->pictq_size++;
         SDL_UnlockMutex(is->pictq_mutex);
+        schedule_refresh(is, (int)(compute_frame_delay(vp->pts, is) * 1000 + 0.5));
     }
     return 0;
 }



More information about the ffmpeg-cvslog mailing list