From ba4c4c1915f7d6fac8a8d07e7b16f6e67f12971e Mon Sep 17 00:00:00 2001 From: Laurent Aimar Date: Mon, 27 Apr 2009 21:07:00 +0200 Subject: [PATCH] Fixed decoder spacing mode selection. Becarfull it breaks the API by modifying input_DecoderDecode prototype. (only stream_output display module use it). --- include/vlc_input.h | 2 +- modules/stream_out/display.c | 2 +- src/input/decoder.c | 6 +++--- src/input/es_out.c | 6 ++++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/vlc_input.h b/include/vlc_input.h index 91c967a7c0..f7fc5f700c 100644 --- a/include/vlc_input.h +++ b/include/vlc_input.h @@ -587,7 +587,7 @@ static inline aout_instance_t *input_GetAout( input_thread_t *p_input ) typedef struct input_clock_t input_clock_t; VLC_EXPORT( decoder_t *, input_DecoderNew, ( input_thread_t *, es_format_t *, input_clock_t *, sout_instance_t * ) ); VLC_EXPORT( void, input_DecoderDelete, ( decoder_t * ) ); -VLC_EXPORT( void, input_DecoderDecode,( decoder_t *, block_t * ) ); +VLC_EXPORT( void, input_DecoderDecode,( decoder_t *, block_t *, bool b_do_pace ) ); /** * This function allows to split a MRL into access, demux and path part. diff --git a/modules/stream_out/display.c b/modules/stream_out/display.c index 1536d860f0..5fa81ba84d 100644 --- a/modules/stream_out/display.c +++ b/modules/stream_out/display.c @@ -216,7 +216,7 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_t *id, else p_buffer->i_pts += p_sys->i_delay; - input_DecoderDecode( id->p_dec, p_buffer ); + input_DecoderDecode( id->p_dec, p_buffer, false ); } p_buffer = p_next; diff --git a/src/input/decoder.c b/src/input/decoder.c index 61ec8c7a64..dd2946067a 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -373,11 +373,11 @@ void input_DecoderDelete( decoder_t *p_dec ) * \param p_dec the decoder object * \param p_block the data block */ -void input_DecoderDecode( decoder_t *p_dec, block_t *p_block ) +void input_DecoderDecode( decoder_t *p_dec, block_t *p_block, bool b_do_pace ) { decoder_owner_sys_t *p_owner = p_dec->p_owner; - if( p_owner->p_input->p->b_out_pace_control ) + if( b_do_pace ) { /* The fifo is not consummed when buffering and so will * deadlock vlc. @@ -923,7 +923,7 @@ static void DecoderFlush( decoder_t *p_dec ) block_t *p_null = DecoderBlockFlushNew(); if( !p_null ) return; - input_DecoderDecode( p_dec, p_null ); + input_DecoderDecode( p_dec, p_null, false ); /* */ while( vlc_object_alive( p_dec ) && p_owner->b_flushing ) diff --git a/src/input/es_out.c b/src/input/es_out.c index 55416c4de1..e0708d0fc0 100644 --- a/src/input/es_out.c +++ b/src/input/es_out.c @@ -1897,9 +1897,11 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block ) { block_t *p_dup = block_Duplicate( p_block ); if( p_dup ) - input_DecoderDecode( es->p_dec_record, p_dup ); + input_DecoderDecode( es->p_dec_record, p_dup, + p_input->p->b_out_pace_control ); } - input_DecoderDecode( es->p_dec, p_block ); + input_DecoderDecode( es->p_dec, p_block, + p_input->p->b_out_pace_control ); es_format_t fmt_dsc; vlc_meta_t *p_meta_dsc; -- 2.39.2