]> git.sesse.net Git - vlc/commitdiff
Protect against bogus time in vout while paused.
authorLaurent Aimar <fenrir@videolan.org>
Tue, 25 Nov 2008 19:58:49 +0000 (20:58 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 29 Nov 2008 09:12:51 +0000 (10:12 +0100)
src/video_output/video_output.c

index 133585d0c70a80b01abe62226989eb68f52633a3..bf4ba431e92be8a69254ea4d6930b7845c0d8934 100644 (file)
@@ -1059,7 +1059,7 @@ static void* RunThread( vlc_object_t *p_this )
             /* Compute FPS rate */
             p_vout->p->p_fps_sample[ p_vout->p->c_fps_samples++ % VOUT_FPS_SAMPLES ] = display_date;
 
-            if( display_date > current_date + VOUT_DISPLAY_DELAY && !p_vout->p->b_paused )
+            if( !p_vout->p->b_paused && display_date > current_date + VOUT_DISPLAY_DELAY )
             {
                 /* A picture is ready to be rendered, but its rendering date
                  * is far from the current one so the thread will perform an
@@ -1084,6 +1084,11 @@ static void* RunThread( vlc_object_t *p_this )
                     display_date = current_date + p_vout->p->render_time;
                 }
             }
+            else if( p_vout->p->b_paused && display_date > current_date + VOUT_DISPLAY_DELAY )
+            {
+                display_date = current_date + VOUT_DISPLAY_DELAY;
+            }
+
             if( p_picture )
             {
                 if( p_picture->date > 1 )