summaryrefslogtreecommitdiff
path: root/src/input/input_v4l.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/input_v4l.c')
-rw-r--r--src/input/input_v4l.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c
index e3af41f85..68ed44b9c 100644
--- a/src/input/input_v4l.c
+++ b/src/input/input_v4l.c
@@ -797,7 +797,7 @@ static int open_radio_capture_device(v4l_input_plugin_t *this)
entry = this->stream->xine->config->lookup_entry(this->stream->xine->config,
"media.video4linux.radio_device");
- if((this->radio_fd = open(entry->str_value, O_RDWR)) < 0) {
+ if((this->radio_fd = open_cloexec(entry->str_value, O_RDWR)) < 0) {
xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
"input_v4l: error opening v4l device (%s): %s\n",
entry->str_value, strerror(errno));
@@ -850,7 +850,7 @@ static int open_video_capture_device(v4l_input_plugin_t *this)
"media.video4linux.video_device");
/* Try to open the video device */
- if((this->video_fd = open(entry->str_value, O_RDWR)) < 0) {
+ if((this->video_fd = open_cloexec(entry->str_value, O_RDWR)) < 0) {
xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
"input_v4l: error opening v4l device (%s): %s\n",
entry->str_value, strerror(errno));
@@ -1539,7 +1539,7 @@ static void v4l_plugin_dispose (input_plugin_t *this_gen) {
if (this->tuner_name)
free(this->tuner_name);
- /* Close video device only if device was openend */
+ /* Close video device only if device was opened */
if (this->video_fd > 0) {
/* Restore v4l audio volume */
@@ -1770,7 +1770,7 @@ static input_plugin_t *v4l_class_get_video_instance (input_class_t *cls_gen,
"media.video4linux.video_device");
/* Try to open the video device */
- if((this->video_fd = open(entry->str_value, O_RDWR)) < 0) {
+ if((this->video_fd = open_cloexec(entry->str_value, O_RDWR)) < 0) {
xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
"input_v4l: error opening v4l device (%s): %s\n",
entry->str_value, strerror(errno));
@@ -1833,7 +1833,7 @@ static input_plugin_t *v4l_class_get_radio_instance (input_class_t *cls_gen,
entry = this->stream->xine->config->lookup_entry(this->stream->xine->config,
"media.video4linux.radio_device");
- if((this->radio_fd = open(entry->str_value, O_RDWR)) < 0) {
+ if((this->radio_fd = open_cloexec(entry->str_value, O_RDWR)) < 0) {
xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
"input_v4l: error opening v4l device (%s): %s\n",
entry->str_value, strerror(errno));