Commit 26e930b5 authored by Gildas Bazin's avatar Gildas Bazin

* include/vlc_block.h: added a temporary i_rate field to block_t.
* modules/codec/libmpeg2.c: synchro uses p_block->i_rate again.
* src/input/*: do not decode audio when i_rate != DEFAULT_RATE.
parent 69ac376c
......@@ -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;
......
......@@ -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 );
......
......@@ -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 );
}
......
......@@ -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 );
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment