]> git.sesse.net Git - vlc/commitdiff
The YUV buffer is now freed after displaying (useful for overlay).
authorChristophe Massiot <massiot@videolan.org>
Tue, 28 Nov 2000 16:00:38 +0000 (16:00 +0000)
committerChristophe Massiot <massiot@videolan.org>
Tue, 28 Nov 2000 16:00:38 +0000 (16:00 +0000)
src/video_output/video_output.c

index dca917387afcbe333be440f968598f653135f1f9..17473518efe0bb67001791129ead4bb0acb3fa0b 100644 (file)
@@ -1067,19 +1067,6 @@ static void RunThread( vout_thread_t *p_vout)
                 }
             }
 
-            /* Remove picture from heap */
-            vlc_mutex_lock( &p_vout->picture_lock );
-            if( p_pic->i_refcount )
-            {
-                p_pic->i_status = DISPLAYED_PICTURE;
-            }
-            else
-            {
-                p_pic->i_status = DESTROYED_PICTURE;
-                p_vout->i_pictures--;
-            }
-            vlc_mutex_unlock( &p_vout->picture_lock );
-
             /* Render interface and subpicture */
             if( b_display && p_vout->b_interface )
             {
@@ -1177,6 +1164,23 @@ static void RunThread( vout_thread_t *p_vout)
 #endif
         }
 
+        if( p_pic )
+        {
+            /* Remove picture from heap */
+            vlc_mutex_lock( &p_vout->picture_lock );
+            if( p_pic->i_refcount )
+            {
+                p_pic->i_status = DISPLAYED_PICTURE;
+            }
+            else
+            {
+                p_pic->i_status = DESTROYED_PICTURE;
+                p_vout->i_pictures--;
+            }
+            vlc_mutex_unlock( &p_vout->picture_lock );
+        }
+
+
         /*
          * Check events and manage thread
          */