comparison libao2/ao_oss.c @ 8303:322f1a91a5e7

avoid giving a /dev/dsp fd to child processes!! (menu exec, xscreensaver nonsense, etc) other parts of mplayer should be fixed like this as well!
author rfelker
date Thu, 28 Nov 2002 16:14:08 +0000
parents b9da278e4c92
children 2dcdd2ae333f
comparison
equal deleted inserted replaced
8302:c7fa49f1de0a 8303:322f1a91a5e7
119 if(fcntl(audio_fd, F_SETFL, 0) < 0) { 119 if(fcntl(audio_fd, F_SETFL, 0) < 0) {
120 mp_msg(MSGT_AO,MSGL_ERR,"audio_setup: Can't make filedescriptor non-blocking: %s\n", strerror(errno)); 120 mp_msg(MSGT_AO,MSGL_ERR,"audio_setup: Can't make filedescriptor non-blocking: %s\n", strerror(errno));
121 return 0; 121 return 0;
122 } 122 }
123 #endif 123 #endif
124
125 #if defined(FD_CLOEXEC) && defined(F_SETFD)
126 fcntl(audio_fd, F_SETFD, FD_CLOEXEC);
127 #endif
124 128
125 ao_data.bps=channels; 129 ao_data.bps=channels;
126 if(format != AFMT_U8 && format != AFMT_S8) 130 if(format != AFMT_U8 && format != AFMT_S8)
127 ao_data.bps*=2; 131 ao_data.bps*=2;
128 132