[vlc-commits] transcode: don't try to setup transcode chain if there isn' t audio codec defined

Ilkka Ollakka git at videolan.org
Sun Feb 9 10:34:16 CET 2014


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Feb  9 10:42:53 2014 +0200| [d3bc32927a4f3c564fff442c89f57e4ca4a9551f] | committer: Ilkka Ollakka

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

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d3bc32927a4f3c564fff442c89f57e4ca4a9551f
---

 modules/stream_out/transcode/audio.c     |    3 ++-
 modules/stream_out/transcode/transcode.c |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/stream_out/transcode/audio.c b/modules/stream_out/transcode/audio.c
index 7529ff79..a52d411 100644
--- a/modules/stream_out/transcode/audio.c
+++ b/modules/stream_out/transcode/audio.c
@@ -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.",
diff --git a/modules/stream_out/transcode/transcode.c b/modules/stream_out/transcode/transcode.c
index c61f2b5..e95ffe6 100644
--- a/modules/stream_out/transcode/transcode.c
+++ b/modules/stream_out/transcode/transcode.c
@@ -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);



More information about the vlc-commits mailing list