[vlc-devel] commit: Fix forced audio filter2 usage in transcode (when using afilter=). Downmixing now works with channels=1 (auto probed filter) or afilter=mono. (Antoine Cellerier )

git version control git at videolan.org
Sat Aug 23 19:04:56 CEST 2008


vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Sat Aug 23 19:01:07 2008 +0200| [f71d15de61bab25ef52b3c54e25ff1d57e22fccf] | committer: Antoine Cellerier 

Fix forced audio filter2 usage in transcode (when using afilter=). Downmixing now works with channels=1 (auto probed filter) or afilter=mono.

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

 modules/stream_out/transcode.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/stream_out/transcode.c b/modules/stream_out/transcode.c
index ba18bde..416c567 100644
--- a/modules/stream_out/transcode.c
+++ b/modules/stream_out/transcode.c
@@ -1211,10 +1211,7 @@ static int transcode_audio_new( sout_stream_t *p_stream,
     }
 
     /* Final checks to see if conversions were successful */
-    if( (fmt_last.audio.i_channels !=
-        id->p_encoder->fmt_in.audio.i_channels) ||
-        (fmt_last.audio.i_rate != id->p_encoder->fmt_in.audio.i_rate) ||
-        (fmt_last.i_codec != id->p_encoder->fmt_in.i_codec) )
+    if( fmt_last.i_codec != id->p_encoder->fmt_in.i_codec )
     {
         msg_Err( p_stream, "no audio filter found "
                            "(%4.4s->%4.4s, channels %d->%d, rate %d->%d)",
@@ -1235,6 +1232,7 @@ static int transcode_audio_new( sout_stream_t *p_stream,
                        transcode_audio_filter_allocation_init, NULL, NULL );
         filter_chain_Reset( id->p_uf_chain, &fmt_last, &id->p_encoder->fmt_in );
         filter_chain_AppendFromString( id->p_uf_chain, p_sys->psz_af2 );
+        fmt_last = *filter_chain_GetFmtOut( id->p_uf_chain );
     }
 
     if( fmt_last.audio.i_channels != id->p_encoder->fmt_in.audio.i_channels )




More information about the vlc-devel mailing list