Mercurial > mplayer.hg
changeset 35201:522fcb8ffb1b
Only a return value of -1 indicates an error for open(),
purely theoretically the mixer device could get 0 assigned
as file descriptor.
Even more theoretically, WinCE uses descriptors with values < 0,
though that probably is non-conformant behaviour.
author | reimar |
---|---|
date | Tue, 30 Oct 2012 17:36:41 +0000 |
parents | 4078c5a09d8e |
children | aa10c22f69f4 |
files | libao2/ao_oss.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libao2/ao_oss.c Tue Oct 30 17:28:34 2012 +0000 +++ b/libao2/ao_oss.c Tue Oct 30 17:36:41 2012 +0000 @@ -182,7 +182,7 @@ if(AF_FORMAT_IS_AC3(ao_data.format)) return CONTROL_TRUE; - if ((fd = open(oss_mixer_device, O_RDONLY)) > 0) + if ((fd = open(oss_mixer_device, O_RDONLY)) != -1) { ioctl(fd, SOUND_MIXER_READ_DEVMASK, &devs); if (devs & (1 << oss_mixer_channel))