[vlc-devel] commit: Prefer new frames over flushed one (vout). (Laurent Aimar )

git version control git at videolan.org
Fri Oct 10 21:28:57 CEST 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Oct 10 00:33:40 2008 +0200| [7bd51629d24f1343fab336d709a8bf80d03da6ae] | committer: Laurent Aimar 

Prefer new frames over flushed one (vout).

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

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

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index c282ee0..a646ef1 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -908,7 +908,30 @@ static void* RunThread( vlc_object_t *p_this )
             }
         }
         if( p_vout->p->b_paused && p_last_picture != NULL )
-            p_picture = p_last_picture;
+        {
+            p_picture = NULL;
+            if( p_last_picture->date == 1 )
+            {
+                for( i_index = 0; i_index < I_RENDERPICTURES; i_index++ )
+                {
+                    picture_t *p_pic = PP_RENDERPICTURE[i_index];
+
+                    if( p_pic->i_status != READY_PICTURE )
+                        continue;
+                    if( p_pic->date <= p_last_picture->date && p_pic != p_last_picture )
+                    {
+                        DropPicture( p_vout, p_pic );
+                    }
+                    else if( p_pic->date > p_last_picture->date && ( p_picture == NULL || p_pic->date < display_date ) )
+                    {
+                        p_picture = p_pic;
+                        display_date = p_picture->date;
+                    }
+                }
+            }
+            if( !p_picture )
+                p_picture = p_last_picture;
+        }
 
         if( p_picture )
         {




More information about the vlc-devel mailing list