X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Finput%2Finput_dec.c;h=0ee1d03a661c38eec0c00f8199cf512c4739dec3;hb=4dec9682f6b5b0b6ed2d5187f4652cb680f39000;hp=7489d7aa7c07ded49a53f3485ba8cd8738e28772;hpb=47e65c0f9bc6e904f6a587769c39e0734b97861b;p=vlc diff --git a/src/input/input_dec.c b/src/input/input_dec.c index 7489d7aa7c..0ee1d03a66 100644 --- a/src/input/input_dec.c +++ b/src/input/input_dec.c @@ -2,7 +2,7 @@ * 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 * @@ -58,10 +58,9 @@ decoder_fifo_t * input_RunDecoder( input_thread_t * p_input, } 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; @@ -76,40 +75,8 @@ decoder_fifo_t * input_RunDecoder( input_thread_t * p_input, 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 @@ -118,6 +85,11 @@ decoder_fifo_t * input_RunDecoder( input_thread_t * p_input, 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.",