* input_dec.c: Functions for the management of decoders
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: input_dec.c,v 1.59 2003/03/04 13:21:19 massiot Exp $
+ * $Id: input_dec.c,v 1.60 2003/04/13 20:00:21 fenrir Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
}
p_fifo->p_module = NULL;
- /* If we are in sout mode, search first for packetizer module then
- * codec to do transcoding */
+ /* If we are in sout mode, search for packetizer module */
psz_sout = config_GetPsz( p_input, "sout" );
- if( psz_sout != NULL && *psz_sout != 0 )
+ if( !p_es->b_force_decoder && psz_sout != NULL && *psz_sout != 0 )
{
vlc_bool_t b_sout = VLC_TRUE;
if( b_sout )
{
- vlc_bool_t b_reencode = VLC_FALSE;
-
- if( p_es->i_cat == AUDIO_ES )
- {
- char *psz_sout_acodec = config_GetPsz( p_input, "sout-acodec" );
- if( psz_sout_acodec != NULL && *psz_sout_acodec != '\0' )
- {
- msg_Dbg( p_input, "audio reencoding requested -> unsupported" );
- b_reencode = VLC_TRUE;
- }
- }
- else if( p_es->i_cat == VIDEO_ES )
- {
- char *psz_sout_vcodec = config_GetPsz( p_input, "sout-vcodec" );
- if( psz_sout_vcodec != NULL && *psz_sout_vcodec != '\0' )
- {
- msg_Dbg( p_input, "video reencoding requested" );
- /* force encoder video output */
- config_PutPsz( p_input, "vout", "encoder" );
- b_reencode = VLC_TRUE;
- }
- }
-
- if( !b_reencode )
- {
- /* we don't want to reencode so search for a packetizer */
- p_fifo->p_module =
- module_Need( p_fifo, "packetizer", "$packetizer" );
- }
- else
- {
- /* get a suitable decoder module to do reencoding*/
- p_fifo->p_module = module_Need( p_fifo, "decoder", "$codec" );
- }
+ p_fifo->p_module =
+ module_Need( p_fifo, "packetizer", "$packetizer" );
}
}
else
p_fifo->p_module = module_Need( p_fifo, "decoder", "$codec" );
}
+ if( psz_sout )
+ {
+ free( psz_sout );
+ }
+
if( p_fifo->p_module == NULL )
{
msg_Err( p_fifo, "no suitable decoder module for fourcc `%4.4s'.\nVLC probably does not support this sound or video format.",