From 11ac4b09efb8ebd7ba4f44e72f685dbb5d1fd87d Mon Sep 17 00:00:00 2001 From: Laurent Aimar Date: Fri, 23 Apr 2010 22:57:49 +0200 Subject: [PATCH] Removed now useless vout_CountPictureAvailable. --- 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 5cf35bb059..5d65be826a 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 ff2c622eea..db179a8c78 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 e737b7bb07..8bac6e495a 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, -- 2.39.5