summaryrefslogtreecommitdiffstats
path: root/stream/stream_dvb.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream_dvb.c')
-rw-r--r--stream/stream_dvb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/stream/stream_dvb.c b/stream/stream_dvb.c
index b34e80b226..71e9b87199 100644
--- a/stream/stream_dvb.c
+++ b/stream/stream_dvb.c
@@ -42,10 +42,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include <fcntl.h>
#include <errno.h>
+#include <libavutil/avstring.h>
+
+#include "osdep/io.h"
+
#include "stream.h"
#include "mpvcore/m_option.h"
#include "mpvcore/path.h"
-#include "libavutil/avstring.h"
#include "dvbin.h"
@@ -735,7 +738,7 @@ dvb_config_t *dvb_get_config(void)
for(i=0; i<MAX_CARDS; i++)
{
snprintf(filename, sizeof(filename), "/dev/dvb/adapter%d/frontend0", i);
- fd = open(filename, O_RDONLY|O_NONBLOCK);
+ fd = open(filename, O_RDONLY|O_NONBLOCK|O_CLOEXEC);
if(fd < 0)
{
mp_msg(MSGT_DEMUX, MSGL_V, "DVB_CONFIG, can't open device %s, skipping\n", filename);