[vlc-commits] commit: Removed now useless vout_CountPictureAvailable. (Laurent Aimar )

git at videolan.org git at videolan.org
Sat Apr 24 00:01:44 CEST 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Apr 23 22:57:49 2010 +0200| [11ac4b09efb8ebd7ba4f44e72f685dbb5d1fd87d] | committer: Laurent Aimar 

Removed now useless vout_CountPictureAvailable.

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

 src/input/decoder.c              |   19 +++----------------
 src/video_output/vout_control.h  |    3 ---
 src/video_output/vout_pictures.c |    6 ------
 3 files changed, 3 insertions(+), 25 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 5cf35bb..5d65be8 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -2252,9 +2252,6 @@ static void aout_del_buffer( decoder_t *p_dec, aout_buffer_t *p_buffer )
                           p_owner->p_aout_input, p_buffer );
 }
 
-
-int vout_CountPictureAvailable( vout_thread_t *p_vout );
-
 static picture_t *vout_new_buffer( decoder_t *p_dec )
 {
     decoder_owner_sys_t *p_owner = p_dec->p_owner;
@@ -2353,22 +2350,12 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
      */
     for( ;; )
     {
-        picture_t *p_picture;
-
         if( p_dec->b_die || p_dec->b_error )
             return NULL;
 
-        /* The video filter chain required that there is always 1 free buffer
-         * that it will use as temporary one. It will release the temporary
-         * buffer once its work is done, so this check is safe even if we don't
-         * lock around both count() and create().
-         */
-        if( vout_CountPictureAvailable( p_owner->p_vout ) >= 2 )
-        {
-            p_picture = vout_CreatePicture( p_owner->p_vout, 0, 0, 0 );
-            if( p_picture )
-                return p_picture;
-        }
+        picture_t *p_picture = vout_CreatePicture( p_owner->p_vout, 0, 0, 0 );
+        if( p_picture )
+            return p_picture;
 
         if( DecoderIsFlushing( p_dec ) )
             return NULL;
diff --git a/src/video_output/vout_control.h b/src/video_output/vout_control.h
index ff2c622..db179a8 100644
--- a/src/video_output/vout_control.h
+++ b/src/video_output/vout_control.h
@@ -30,9 +30,6 @@
 #ifndef _VOUT_CONTROL_H
 #define _VOUT_CONTROL_H 1
 
-/* DO NOT use vout_CountPictureAvailable unless your are in src/input/decoder.c (no exception) */
-int vout_CountPictureAvailable( vout_thread_t * );
-
 /**
  * This function will (un)pause the display of pictures.
  * It is thread safe
diff --git a/src/video_output/vout_pictures.c b/src/video_output/vout_pictures.c
index e737b7b..8bac6e4 100644
--- a/src/video_output/vout_pictures.c
+++ b/src/video_output/vout_pictures.c
@@ -70,12 +70,6 @@ void vout_DisplayPicture( vout_thread_t *p_vout, picture_t *p_pic )
  * It needs locking since several pictures can be created by several producers
  * threads.
  */
-int vout_CountPictureAvailable( vout_thread_t *p_vout )
-{
-#warning "TODO remove vout_CountPictureAvailable"
-    return VOUT_MAX_PICTURES;
-}
-
 picture_t *vout_CreatePicture( vout_thread_t *p_vout,
                                bool b_progressive,
                                bool b_top_field_first,



More information about the vlc-commits mailing list