[MPlayer-dev-eng] [PATCH] Proof of concept extrasurround plugin

Kis Gergely kisg at lme.linux.hu
Thu Apr 4 21:16:53 CEST 2002


On Thu, Apr 04, 2002 at 08:11:41PM +0200, Arpi wrote:
> > The -channels switch talks to the audio decoder. It would confuse users, if
> > we used it in this situation too. 
> 
> hmm, not really.
> maybe i'm wrong, but...
> its purpose to set number of output(!) channels.
> of course it's told to the decoder first, so it can try to produce N
> channels output (only liba52 can produce more than 2).
> of course the ao plugins can use (and should) this value to know how many
> output channels teh user wants. it may be ignored, as it's only a hint,
> but if you get 2 channels as input, but user wants 6 (-channels 6), you know
> that you have to do 2->6 conversion in your plugin.
OK, I will rewrite it to use the -channels switch.


> 
> btw, about the 6 channel bugs...
> there were a long discussion about it here, but i don't really remember the
> end/solution. the problem source was that outburst isn't always divisable by
> 6, so pcm audio stream is cutted in the middle of a sample, insteda of
> sample boundary.
This problem has been solved since then. Buffering has been added to
ao_plugin.  

But there is a bug in ao_plugin.c that in some cases gives an odd number 
(!!) as ao_plugin_data.len to the plugin when it calls play().
This odd number is specifically 1023 or 2047 in most of the cases, while in
the working case 1024 and 2048.
 
I simply made a "quickfix": if len is odd add 1 to it, and every known bug 
is gone!

I will create a new patch with -channels parameter and this quickfix.
Maybe I will try to make a real fix for the problem, but I think Anders is
the right person to do it. :-)

Bye,
kisg




More information about the MPlayer-dev-eng mailing list