[MPlayer-cvslog] r35295 - trunk/libao2/ao_oss.c
reimar
subversion at mplayerhq.hu
Tue Oct 30 18:36:41 CET 2012
Author: reimar
Date: Tue Oct 30 18:36:41 2012
New Revision: 35295
Log:
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.
Modified:
trunk/libao2/ao_oss.c
Modified: trunk/libao2/ao_oss.c
==============================================================================
--- trunk/libao2/ao_oss.c Tue Oct 30 18:28:34 2012 (r35294)
+++ trunk/libao2/ao_oss.c Tue Oct 30 18:36:41 2012 (r35295)
@@ -182,7 +182,7 @@ static int control(int cmd,void *arg){
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))
More information about the MPlayer-cvslog
mailing list