Commit d3bc3292 authored by Ilkka Ollakka's avatar Ilkka Ollakka

transcode: don't try to setup transcode chain if there isn't audio codec defined

parent bacd5123
......@@ -94,7 +94,8 @@ static int transcode_audio_initialize_encoder( sout_stream_id_t *id, sout_stream
id->p_encoder->p_cfg = p_stream->p_sys->p_audio_cfg;
id->p_encoder->p_module =
module_need( id->p_encoder, "encoder", p_sys->psz_aenc, true );
if( !id->p_encoder->p_module )
/* p_sys->i_acodec = 0 if there isn't acodec defined */
if( !id->p_encoder->p_module && p_sys->i_acodec )
{
msg_Err( p_stream, "cannot find audio encoder (module:%s fourcc:%4.4s). "
"Take a look few lines earlier to see possible reason.",
......
......@@ -549,7 +549,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
bool success;
if( p_fmt->i_cat == AUDIO_ES && (p_sys->i_acodec || p_sys->psz_aenc) )
if( p_fmt->i_cat == AUDIO_ES && p_sys->i_acodec )
success = transcode_audio_add(p_stream, p_fmt, id);
else if( p_fmt->i_cat == VIDEO_ES && (p_sys->i_vcodec || p_sys->psz_venc) )
success = transcode_video_add(p_stream, p_fmt, id);
......
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