[MPlayer-dev-eng] Re: [PATCH] af_ambisonic

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Wed Apr 18 17:35:29 CEST 2007


Hello,
On Wed, Apr 18, 2007 at 04:25:25PM +0200, Sebastian Olter wrote:
>  Wed Apr 18 15:24:37 CEST 2007 Alex Beregszaszi:
> > In the case you can't live without it, the proper place is at osdep/ for
> > the strsep implementation. And don't forget adding configure checks.
> 
>  As I've been told before (Rich Felker) strsep() might be risky on some
>  systems, so perhaps it's not so good idea to rely on their
>  implementations. My version is very short and proven to be safe; maybe
>  it will be better to leave it as file static.

No, don't reimplement strsep, a function that does all that you use of
strsep functionality can be done in at most 6 instead of 18 lines.
Anyway, if you want to use this you will have to strdup the string
first, you may not modify the one you get from AF_CONTROL_COMMAND_LINE
IIRC.

> >  Wed Apr 18 15:40:23 CEST 2007 Reimar Döffinger:
> >  But did you (the "you" sending the patch) try if you can't just use the
> >  subopt_parse from subopt-helper.c function for parsing??
> 
>  I'll consider this but the Ambisonic options have an additional level
>  of complexity; throwing this out would result in something tricky like
>  af_pan, but much more complicated. I don't want to require users to
>  waste time for learning options; better let them learn how to properly
>  encode surround sound :P

Check what subopt-helper.c does first, it is what e.g. -vo gl uses.
And it shouldn't require you to change the syntax.
You will still have to do some parsing, but it still should simplify the
code greatly.

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list