[vlc-devel] commit: Protect against bogus time in vout while paused. (Laurent Aimar )

git version control git at videolan.org
Sat Nov 29 10:53:15 CET 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Nov 25 20:58:49 2008 +0100| [db4b1b44bf969f3db9b17e31d48efed60b5154cd] | committer: Laurent Aimar 

Protect against bogus time in vout while paused.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=db4b1b44bf969f3db9b17e31d48efed60b5154cd
---

 src/video_output/video_output.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 133585d..bf4ba43 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -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 )




More information about the vlc-devel mailing list