[MPlayer-dev-eng] [PATCH] Return actual current stream id in slave mode

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Dec 27 16:40:54 CET 2009


On Sun, Dec 27, 2009 at 03:22:37PM +0100, Adrian Stutz wrote:
> On Sun, Dec 27, 2009 at 1:49 PM, Reimar Döffinger
> <Reimar.Doeffinger at gmx.de> wrote:
> > Well, which you did with the other patch, but even with that when audio
> > is disabled you would say "ANS_ERROR=UNAVAILABLE" when actually it is
> > disabled which is just wrong (also, audio being disabled is not really
> > an error in getting the current audio track, is it?).
> 
> The behavior is the same as with the old code: If I played a movie
> without audio track or used -nosound then "get_property switch_audio"
> would return "Failed to get value of property 'switch_audio'". I guess
> sh_audio, which was used before, is NULL in those cases. Letting
> switch_audio return -2 is new behavior.
> 
> I don't care if it returns -2 instead of an error. I kept it in line
> with the old behavior because it doesn't bother me if it returns an
> error in that case.
> 
> Also, how would you check if audio is disabled instead of actually
> unavailable? The audio id is -2 in both of those cases.

In theory it should return UNAVAILABLE if no audio is available at all
and -2 otherwise. I wouldn't suggest to rely on it though.
A reliable check is of course trying to enable audio...



More information about the MPlayer-dev-eng mailing list