[vlc-devel] commit: Fixed vout_FixLeaks logic. (Laurent Aimar )

git version control git at videolan.org
Mon Jan 5 21:26:48 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Jan  5 21:26:05 2009 +0100| [2eff2815ce71777582c41640332c5118583e249c] | committer: Laurent Aimar 

Fixed vout_FixLeaks logic.

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

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

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 34e6c2a..6fb4fe5 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -711,7 +711,16 @@ void vout_FixLeaks( vout_thread_t *p_vout, bool b_forced )
 
         msg_Dbg( p_vout, "[%d] %d %d", i_pic, p_pic->i_status, p_pic->i_refcount );
         p_pic->i_refcount = 0;
-        vout_UsePictureLocked( p_vout, p_pic );
+
+        switch( p_pic->i_status )
+        {
+        case READY_PICTURE:
+        case DISPLAYED_PICTURE:
+        case RESERVED_PICTURE:
+            if( p_pic != p_vout->p->p_picture_displayed )
+                vout_UsePictureLocked( p_vout, p_pic );
+            break;
+        }
     }
     vlc_cond_signal( &p_vout->p->picture_wait );
     vlc_mutex_unlock( &p_vout->picture_lock );




More information about the vlc-devel mailing list