summaryrefslogtreecommitdiff
path: root/src/audio_out
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2011-10-04 23:41:41 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2011-10-04 23:41:41 +0100
commit5be586e3025e72c1a1cef2a3ada6238486f7ed43 (patch)
tree2a5da19b632e9296e622e47c161062caec0b9b89 /src/audio_out
parentd7c4d2bd622b1405ff520006dbeaf739e9725a89 (diff)
parent7e335173083e1fc91f27927a2d749f5a09773b32 (diff)
downloadxine-lib-5be586e3025e72c1a1cef2a3ada6238486f7ed43.tar.gz
xine-lib-5be586e3025e72c1a1cef2a3ada6238486f7ed43.tar.bz2
Merge from 1.1.
--HG-- rename : src/xine-utils/attributes.h => include/xine/attributes.h rename : src/xine-engine/xine_internal.h => include/xine/xine_internal.h rename : src/xine-utils/xineutils.h => include/xine/xineutils.h
Diffstat (limited to 'src/audio_out')
-rw-r--r--src/audio_out/audio_file_out.c2
-rw-r--r--src/audio_out/audio_oss_out.c8
-rw-r--r--src/audio_out/audio_sun_out.c8
3 files changed, 9 insertions, 9 deletions
diff --git a/src/audio_out/audio_file_out.c b/src/audio_out/audio_file_out.c
index 85ee8ad48..c8fe51f72 100644
--- a/src/audio_out/audio_file_out.c
+++ b/src/audio_out/audio_file_out.c
@@ -115,7 +115,7 @@ static int ao_file_open(ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int
if (!this->fname)
this->fname = "xine-out.wav";
- this->fd = open(this->fname, O_WRONLY|O_TRUNC|O_CREAT, 0644);
+ this->fd = xine_create_cloexec(this->fname, O_WRONLY|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
if (this->fd == -1) {
xprintf (this->xine, XINE_VERBOSITY_LOG, "audio_file_out: Failed to open file '%s': %s\n",
diff --git a/src/audio_out/audio_oss_out.c b/src/audio_out/audio_oss_out.c
index 693c2b80f..cf1608a25 100644
--- a/src/audio_out/audio_oss_out.c
+++ b/src/audio_out/audio_oss_out.c
@@ -190,7 +190,7 @@ static int ao_oss_open(ao_driver_t *this_gen,
* open audio device
*/
- this->audio_fd=open(this->audio_dev,O_WRONLY|O_NONBLOCK);
+ this->audio_fd = xine_open_cloexec(this->audio_dev, O_WRONLY|O_NONBLOCK);
if (this->audio_fd < 0) {
xprintf(this->xine, XINE_VERBOSITY_LOG,
_("audio_oss_out: Opening audio device %s: %s\n"), this->audio_dev, strerror(errno));
@@ -781,7 +781,7 @@ static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const void *da
xprintf(class->xine, XINE_VERBOSITY_LOG,
_("audio_oss_out: using device >%s<\n"), this->audio_dev);
- audio_fd = open(this->audio_dev, O_WRONLY|O_NONBLOCK);
+ audio_fd = xine_open_cloexec(this->audio_dev, O_WRONLY|O_NONBLOCK);
if (audio_fd < 0) {
xprintf(class->xine, XINE_VERBOSITY_LOG,
@@ -894,7 +894,7 @@ static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const void *da
_("audio_oss_out: Audio driver realtime sync disabled...\n"
"audio_oss_out: ...probing output buffer size: %d bytes\naudio_oss_out: ...there may be audio/video synchronization issues\n"), this->buffer_size);
- audio_fd=open(this->audio_dev, O_WRONLY|O_NONBLOCK);
+ audio_fd = xine_open_cloexec(this->audio_dev, O_WRONLY|O_NONBLOCK);
if(audio_fd < 0)
{
@@ -1048,7 +1048,7 @@ static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const void *da
}
_x_assert(this->mixer.name);
- this->mixer.fd = open(this->mixer.name, O_RDONLY);
+ this->mixer.fd = xine_open_cloexec(this->mixer.name, O_RDONLY);
if(this->mixer.fd != -1) {
diff --git a/src/audio_out/audio_sun_out.c b/src/audio_out/audio_sun_out.c
index 5b5f39365..34d2f14ec 100644
--- a/src/audio_out/audio_sun_out.c
+++ b/src/audio_out/audio_sun_out.c
@@ -160,7 +160,7 @@ static int realtime_samplecounter_available(xine_t *xine, char *dev)
if (silence == NULL)
goto error;
- if ((fd = open(dev, O_WRONLY|O_NONBLOCK)) < 0)
+ if ((fd = xine_open_cloexec(dev, O_WRONLY|O_NONBLOCK)) < 0)
goto error;
/* We wanted non blocking open but now put it back to normal */
@@ -449,7 +449,7 @@ static int ao_sun_open(ao_driver_t *this_gen,
* open audio device
*/
- this->audio_fd = open(this->audio_dev, O_WRONLY|O_NONBLOCK);
+ this->audio_fd = xine_open_cloexec(this->audio_dev, O_WRONLY|O_NONBLOCK);
if(this->audio_fd < 0) {
xprintf(this->xine, XINE_VERBOSITY_LOG,
_("audio_sun_out: opening audio device %s failed: %s\n"), this->audio_dev, strerror(errno));
@@ -939,8 +939,8 @@ static ao_driver_t *ao_sun_open_plugin (audio_driver_class_t *class_gen, const v
/*
* open the device
*/
-
- this->audio_fd = open(this->audio_dev = devname, O_WRONLY|O_NONBLOCK);
+ this->audio_dev = devname;
+ this->audio_fd = xine_open_cloexec(devname, O_WRONLY|O_NONBLOCK);
if(this->audio_fd < 0)
{