]> git.sesse.net Git - vlc/commitdiff
transcode: don't try to setup transcode chain if there isn't audio codec defined
authorIlkka Ollakka <ileoo@videolan.org>
Sun, 9 Feb 2014 08:42:53 +0000 (10:42 +0200)
committerIlkka Ollakka <ileoo@videolan.org>
Sun, 9 Feb 2014 09:01:53 +0000 (11:01 +0200)
modules/stream_out/transcode/audio.c
modules/stream_out/transcode/transcode.c

index 7529ff79aa33935e6b5104b1afa73a882846394c..a52d4114a37b3289412aec8c48f962d5e330ca0a 100644 (file)
@@ -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.",
index c61f2b5fcba64fcd96ec988d5ab07085224a3aa8..e95ffe69a8f352ccdc25c13d3379244d78e5ee21 100644 (file)
@@ -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);