]> git.sesse.net Git - vlc/commitdiff
* include/vlc_block.h: added a temporary i_rate field to block_t.
authorGildas Bazin <gbazin@videolan.org>
Wed, 24 Dec 2003 09:46:08 +0000 (09:46 +0000)
committerGildas Bazin <gbazin@videolan.org>
Wed, 24 Dec 2003 09:46:08 +0000 (09:46 +0000)
* modules/codec/libmpeg2.c: synchro uses p_block->i_rate again.
* src/input/*: do not decode audio when i_rate != DEFAULT_RATE.

include/vlc_block.h
modules/codec/libmpeg2.c
src/input/es_out.c
src/input/input_dec.c

index 779183147fa9adb8dd7c66c8cf326682a07cf9ce..95b2783dfbab52da140e65c4c5764fc3fdce9410 100644 (file)
@@ -2,7 +2,7 @@
  * vlc_block.h: Data blocks management functions
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: vlc_block.h,v 1.4 2003/10/27 01:04:38 gbazin Exp $
+ * $Id: vlc_block.h,v 1.5 2003/12/24 09:46:08 gbazin Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -40,6 +40,7 @@ struct block_t
     mtime_t     i_length;
 
     vlc_bool_t  b_discontinuity; /* only temporary */
+    int         i_rate;
 
     int         i_buffer;
     uint8_t     *p_buffer;
index 29469134052c26fa5b12cf149276c7438da7cad9..a8d1bd2cfc8611c775d07df79ac00d2a001e90ca 100755 (executable)
@@ -2,7 +2,7 @@
  * libmpeg2.c: mpeg2 video decoder module making use of libmpeg2.
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: libmpeg2.c,v 1.40 2003/12/22 16:40:04 gbazin Exp $
+ * $Id: libmpeg2.c,v 1.41 2003/12/24 09:46:08 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -221,7 +221,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
                 p_sys->i_current_pts = p_block->i_pts;
             }
 
-            p_sys->i_current_rate = DEFAULT_RATE;//p_pes->i_rate;
+            p_sys->i_current_rate = p_block->i_rate;
 
             mpeg2_buffer( p_sys->p_mpeg2dec, p_block->p_buffer,
                           p_block->p_buffer + p_block->i_buffer );
index 9cbc987de7f05a38701bdf672d535a07fbe6b1a7..8ae0dc8e977ac89730bac5b60048b264faf9640a 100644 (file)
@@ -2,7 +2,7 @@
  * es_out.c: Es Out handler for input.
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: es_out.c,v 1.10 2003/12/22 02:24:50 sam Exp $
+ * $Id: es_out.c,v 1.11 2003/12/24 09:46:08 gbazin Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -465,7 +465,9 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
     }
 
     vlc_mutex_lock( &out->p_sys->p_input->stream.stream_lock );
-    if( es->p_es->p_dec )
+    p_block->i_rate = out->p_sys->p_input->stream.control.i_rate;
+    if( es->p_es->p_dec &&
+        (es->p_es->i_cat!=AUDIO_ES || !p_sys->p_input->stream.control.b_mute) )
     {
         input_DecodeBlock( es->p_es->p_dec, p_block );
     }
index 887f1fbfe09dc5632489d810e347600d4d81d314..3845bfffa307b3a346ff5881aa4d80b037ab9c66 100644 (file)
@@ -2,7 +2,7 @@
  * input_dec.c: Functions for the management of decoders
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: input_dec.c,v 1.82 2003/11/30 16:00:24 fenrir Exp $
+ * $Id: input_dec.c,v 1.83 2003/12/24 09:46:08 gbazin Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Gildas Bazin <gbazin@netcourrier.com>
@@ -265,6 +265,7 @@ void input_DecodePES( decoder_t * p_dec, pes_packet_t * p_pes )
             p_block->i_pts = p_pes->i_pts;
             p_block->i_dts = p_pes->i_dts;
             p_block->b_discontinuity = p_pes->b_discontinuity;
+            p_block->i_rate = p_pes->i_rate;
 
             input_DecodeBlock( p_dec, p_block );
         }