[vlc-devel] [PATCH] Audio channel remapping filter

Rémi Denis-Courmont remi at remlab.net
Fri Dec 23 20:56:57 CET 2011


   Hello,

On Wednesday 21 December 2011, Cheng Sun wrote:
> On 21/12/11 17:47, Rémi Denis-Courmont wrote:
> > WTF?
> 
> Nicely summed up :)

This is useless since you already check that format are identical:

+        ( audio_in->i_bitspersample != audio_out->i_bitspersample) ||

This is useless since you have a list of supported formats in GetRemapFun(). 
However, you should move GetRemapFun() earlier in probing.

+        ( audio_in->i_bitspersample % 8 != 0 ) )

+    audio_out->i_rate = audio_in->i_rate;

You are not supposed to change the rate, unless you're implementing a 
resampler.

+    audio_out->i_format = p_filter->fmt_out.i_codec;

That is also useless.

-- 
Rémi Denis-Courmont
http://www.remlab.info



More information about the vlc-devel mailing list