summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Rankin <rankincj@yahoo.com>2011-10-03 01:35:02 +0100
committerChris Rankin <rankincj@yahoo.com>2011-10-03 01:35:02 +0100
commitbd482ac652db2a937381c475718139f1668de266 (patch)
tree7c7881fefa8277205124efdf1e5c6286ce7c4381
parent154d771692a1ca9b9af5eb0acc12885ca852307a (diff)
downloadxine-lib-bd482ac652db2a937381c475718139f1668de266.tar.gz
xine-lib-bd482ac652db2a937381c475718139f1668de266.tar.bz2
Add CLOEXEC flag to DXR3 plugin's descriptors.
-rw-r--r--src/dxr3/dxr3_decode_spu.c2
-rw-r--r--src/dxr3/dxr3_decode_video.c4
-rw-r--r--src/dxr3/dxr3_scr.c2
-rw-r--r--src/dxr3/video_out_dxr3.c8
4 files changed, 8 insertions, 8 deletions
diff --git a/src/dxr3/dxr3_decode_spu.c b/src/dxr3/dxr3_decode_spu.c
index ca2df4afd..82dfd2f91 100644
--- a/src/dxr3/dxr3_decode_spu.c
+++ b/src/dxr3/dxr3_decode_spu.c
@@ -236,7 +236,7 @@ static spu_decoder_t *dxr3_spudec_open_plugin(spu_decoder_class_t *class_gen, xi
else {
/* open dxr3 spu device */
snprintf(tmpstr, sizeof(tmpstr), "/dev/em8300_sp-%d", this->devnum);
- if ((this->fd_spu = open(tmpstr, O_WRONLY)) < 0) {
+ if ((this->fd_spu = open_cloexec(tmpstr, O_WRONLY)) < 0) {
xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
_("dxr3_decode_spu: Failed to open spu device %s (%s)\n"), tmpstr, strerror(errno));
pthread_mutex_unlock(&this->dxr3_vo->spu_device_lock);
diff --git a/src/dxr3/dxr3_decode_video.c b/src/dxr3/dxr3_decode_video.c
index 252415850..a5af67b36 100644
--- a/src/dxr3/dxr3_decode_video.c
+++ b/src/dxr3/dxr3_decode_video.c
@@ -227,7 +227,7 @@ static video_decoder_t *dxr3_open_plugin(video_decoder_class_t *class_gen, xine_
/* open later, because dxr3_video_out might have it open until we request a frame */
this->fd_video = -1;
- if ((this->fd_control = open(tmpstr, O_WRONLY)) < 0) {
+ if ((this->fd_control = open_cloexec(tmpstr, O_WRONLY)) < 0) {
xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
_("dxr3_decode_video: Failed to open control device %s (%s)\n"), tmpstr, strerror(errno));
free(this);
@@ -508,7 +508,7 @@ static void dxr3_decode_data(video_decoder_t *this_gen, buf_element_t *buf)
/* open the device for the decoder */
snprintf (tmpstr, sizeof(tmpstr), "/dev/em8300_mv-%d", this->devnum);
- if ((this->fd_video = open(tmpstr, O_WRONLY)) < 0) {
+ if ((this->fd_video = open_cloexec(tmpstr, O_WRONLY)) < 0) {
xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
_("dxr3_decode_video: Failed to open video device %s (%s)\n"), tmpstr, strerror(errno));
return;
diff --git a/src/dxr3/dxr3_scr.c b/src/dxr3/dxr3_scr.c
index dd0ea5840..ad6d98b50 100644
--- a/src/dxr3/dxr3_scr.c
+++ b/src/dxr3/dxr3_scr.c
@@ -75,7 +75,7 @@ dxr3_scr_t *dxr3_scr_init(xine_t *xine)
devnum = xine->config->register_num(xine->config,
CONF_KEY, 0, CONF_NAME, CONF_HELP, 10, NULL, NULL);
snprintf(tmpstr, sizeof(tmpstr), "/dev/em8300-%d", devnum);
- if ((this->fd_control = open(tmpstr, O_WRONLY)) < 0) {
+ if ((this->fd_control = open_cloexec(tmpstr, O_WRONLY)) < 0) {
xprintf(this->xine, XINE_VERBOSITY_DEBUG,
"dxr3_scr: Failed to open control device %s (%s)\n", tmpstr, strerror(errno));
free(this);
diff --git a/src/dxr3/video_out_dxr3.c b/src/dxr3/video_out_dxr3.c
index 233453738..dfab75024 100644
--- a/src/dxr3/video_out_dxr3.c
+++ b/src/dxr3/video_out_dxr3.c
@@ -271,7 +271,7 @@ static vo_driver_t *dxr3_vo_open_plugin(video_driver_class_t *class_gen, const v
snprintf(tmpstr, sizeof(tmpstr), "/dev/em8300-%d", class->devnum);
llprintf(LOG_VID, "Entering video init, devname = %s.\n", tmpstr);
- if ((this->fd_control = open(tmpstr, O_WRONLY)) < 0) {
+ if ((this->fd_control = open_cloexec(tmpstr, O_WRONLY)) < 0) {
xprintf(this->class->xine, XINE_VERBOSITY_LOG,
_("video_out_dxr3: Failed to open control device %s (%s)\n"), tmpstr, strerror(errno));
@@ -280,7 +280,7 @@ static vo_driver_t *dxr3_vo_open_plugin(video_driver_class_t *class_gen, const v
}
snprintf (tmpstr, sizeof(tmpstr), "/dev/em8300_mv-%d", class->devnum);
- if ((this->fd_video = open (tmpstr, O_WRONLY | O_SYNC )) < 0) {
+ if ((this->fd_video = open_cloexec(tmpstr, O_WRONLY | O_SYNC )) < 0) {
xprintf(this->class->xine, XINE_VERBOSITY_LOG,
_("video_out_dxr3: Failed to open video device %s (%s)\n"), tmpstr, strerror(errno));
return 0;
@@ -637,7 +637,7 @@ static void dxr3_update_frame_format(vo_driver_t *this_gen, vo_frame_t *frame_ge
/* open the device for the encoder */
snprintf(tmpstr, sizeof(tmpstr), "/dev/em8300_mv-%d", this->class->devnum);
- if ((this->fd_video = open(tmpstr, O_WRONLY)) < 0)
+ if ((this->fd_video = open_cloexec(tmpstr, O_WRONLY)) < 0)
xprintf(this->class->xine, XINE_VERBOSITY_DEBUG,
"video_out_dxr3: Failed to open video device %s (%s)\n", tmpstr, strerror(errno));
@@ -832,7 +832,7 @@ static void dxr3_overlay_end(vo_driver_t *this_gen, vo_frame_t *frame_gen)
/* try to open the dxr3 spu device */
if (!this->fd_spu) {
snprintf (tmpstr, sizeof(tmpstr), "/dev/em8300_sp-%d", this->class->devnum);
- if ((this->fd_spu = open (tmpstr, O_WRONLY)) < 0) {
+ if ((this->fd_spu = open_cloexec(tmpstr, O_WRONLY)) < 0) {
xprintf(this->class->xine, XINE_VERBOSITY_DEBUG,
"video_out_dxr3: Failed to open spu device %s (%s)\n"
"video_out_dxr3: Overlays are not available\n", tmpstr, strerror(errno));