Fixed decoder spacing mode selection.
authorLaurent Aimar <fenrir@videolan.org>
Mon, 27 Apr 2009 19:07:00 +0000 (21:07 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Tue, 28 Apr 2009 16:59:41 +0000 (18:59 +0200)
Becarfull it breaks the API by modifying input_DecoderDecode prototype.
(only stream_output display module use it).

include/vlc_input.h
modules/stream_out/display.c
src/input/decoder.c
src/input/es_out.c

index 91c967a..f7fc5f7 100644 (file)
@@ -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.
index 1536d86..5fa81ba 100644 (file)
@@ -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;
index 61ec8c7..dd29460 100644 (file)
@@ -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 )
index 55416c4..e0708d0 100644 (file)
@@ -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;