[MPlayer-cvslog] r31725 - trunk/libao2/ao_coreaudio.c
Adrian Stutz
adrian at sttz.ch
Mon Jul 12 23:31:08 CEST 2010
On Mon, Jul 12, 2010 at 22:50, Reimar Döffinger
<Reimar.Doeffinger at gmx.de> wrote:
> How is that an improvement? Before it would at least quit
> for audio files, I doubt anyone really wants MPlayer to play
> something when they asked for help (even though that's currently
> not easily avoidable).
> I also think it is inconsistent with almost all other MPlayer ao/vos
No, it wouldn't quit. It would only fail to initialize the audio
output and continue anyway - without audio.
In case you've selected multiple audio outs it would use the next one.
In the context of the init function, returning 0 means the output
failed to initialize, which I think is wrong to return in case nothing
is actually wrong. Like in this case, where the user wants to see the
help and not watch a video without sound.
Of course, best would be if it just printed the help and the exited,
just like with most other help option. But then it also should parse
the suboptions before any initialization so that the help can be
displayed even if no audio stream is being played and before any other
initialization messages.
The other similar lists I could find (-vf format=fmt=help and -pphelp)
are special cases and that seems overkill to do for ao_coraudio. There
isn't anything comparable I could find since all other lists are more
top-level than ao_coreaudio.
In this situation, I think that this commit is actually an
improvement. It avoids the unexpected behavior of failing to
initialize the audio output you probably want to use and then either
using none or another one.
Sure, the situation is far from ideal but all other options require
much more work and so this seemed to be the best compromise for the
moment.
One option would be to exit after showing the help but I'm not sure
how clean that would be and it would be inconsistent with all other
audio outputs, which show the help and then continue with either no or
the next audio output.
Greetings,
Adrian
More information about the MPlayer-cvslog
mailing list