]> git.sesse.net Git - vlc/commitdiff
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 91c967a7c0d686cee4c3f8860101ea466f176697..f7fc5f700c1558059c720e936f2270f25c5b9cab 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 1536d860f0a1ff4ce2fbc9f890369e6db065eb36..5fa81ba84d3dd1f90245abb489b1f3f88792b26b 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 61ec8c7a647991401e07ace45165afc63ac2ed09..dd2946067aa60b7a4c5ccef16fbc00f4a64a4310 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 55416c4de1c8da71bc24892bfc1cf777a4c3552f..e0708d0fc072b2be34ffb3ec9fbd0d9ed0ce3939 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;