summaryrefslogtreecommitdiff
path: root/src/input/input_dvb.c
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/input/input_dvb.c
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/input/input_dvb.c')
-rw-r--r--src/input/input_dvb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c
index a045276d5..f56e806fd 100644
--- a/src/input/input_dvb.c
+++ b/src/input/input_dvb.c
@@ -617,7 +617,7 @@ static tuner_t *XINE_MALLOC tuner_init(xine_t * xine, int adapter)
}
}
for (x = 0; x < MAX_SUBTITLES; x++) {
- this->fd_subfilter[x] = open(this->demux_device, O_RDWR);
+ this->fd_subfilter[x] = xine_open_cloexec(this->demux_device, O_RDWR);
if (this->fd_subfilter[x] < 0) {
xprintf(this->xine, XINE_VERBOSITY_DEBUG, "DEMUX DEVICE Subtitle filter: %s\n", strerror(errno));
}
@@ -638,7 +638,7 @@ static tuner_t *XINE_MALLOC tuner_init(xine_t * xine, int adapter)
if(this->feinfo.type==FE_OFDM) xprintf(this->xine,XINE_VERBOSITY_DEBUG,"TER Card\n");
if(this->feinfo.type==FE_ATSC) xprintf(this->xine,XINE_VERBOSITY_DEBUG,"US Card\n");
- if ((test_video=open(video_device, O_RDWR)) < 0) {
+ if ((test_video=xine_open_cloexec(video_device, O_RDWR)) < 0) {
xprintf(this->xine,XINE_VERBOSITY_DEBUG,"input_dvb: Card has no hardware decoder\n");
}else{
xprintf(this->xine,XINE_VERBOSITY_DEBUG,"input_dvb: Card HAS HARDWARE DECODER\n");
@@ -2126,7 +2126,7 @@ static int switch_channel(dvb_input_plugin_t *this, int channel) {
for (x = 0; x < MAX_FILTERS; x++) {
close(this->tuner->fd_pidfilter[x]);
- this->tuner->fd_pidfilter[x] = open(this->tuner->demux_device, O_RDWR);
+ this->tuner->fd_pidfilter[x] = xine_open_cloexec(this->tuner->demux_device, O_RDWR);
}
if (!tuner_set_channel (this, &this->channels[channel])) {
@@ -2160,7 +2160,7 @@ static int switch_channel(dvb_input_plugin_t *this, int channel) {
this->channel = channel;
- this->fd = open (this->tuner->dvr_device, O_RDONLY | O_NONBLOCK);
+ this->fd = xine_open_cloexec(this->tuner->dvr_device, O_RDONLY | O_NONBLOCK);
this->tuned_in = 1;
pthread_mutex_unlock (&this->channel_change_mutex);
@@ -2234,7 +2234,7 @@ static void do_record (dvb_input_plugin_t *this) {
}
/* start recording */
- this->record_fd = open (filename, O_CREAT | O_APPEND | O_WRONLY, 0644);
+ this->record_fd = xine_create_cloexec(filename, O_APPEND | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
this->stream->osd_renderer->clear (this->rec_osd);
@@ -2980,7 +2980,7 @@ static int dvb_plugin_open(input_plugin_t * this_gen)
return 0;
}
- if ((this->fd = open(this->tuner->dvr_device, O_RDONLY |O_NONBLOCK)) < 0) {
+ if ((this->fd = xine_open_cloexec(this->tuner->dvr_device, O_RDONLY |O_NONBLOCK)) < 0) {
xprintf(this->class->xine, XINE_VERBOSITY_LOG,
_("input_dvb: cannot open dvr device '%s'\n"), this->tuner->dvr_device);
return 0;