summaryrefslogtreecommitdiffstats
path: root/stream/stream_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream_file.c')
-rw-r--r--stream/stream_file.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/stream/stream_file.c b/stream/stream_file.c
index bfe40429cb..7d2b82fb58 100644
--- a/stream/stream_file.c
+++ b/stream/stream_file.c
@@ -3,18 +3,18 @@
*
* This file is part of mpv.
*
- * mpv is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * mpv is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
*
* mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along
- * with mpv. If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
@@ -123,7 +123,7 @@ static int control(stream_t *s, int cmd, void *arg)
static void s_close(stream_t *s)
{
struct priv *p = s->priv;
- if (p->close && p->fd >= 0)
+ if (p->close)
close(p->fd);
}
@@ -253,7 +253,6 @@ static int open_f(stream_t *stream)
MP_ERR(stream, "Invalid FD: %s\n", stream->url);
return STREAM_ERROR;
}
- p->close = false;
} else if (!strcmp(filename, "-")) {
if (!write) {
MP_INFO(stream, "Reading from stdin...\n");
@@ -262,7 +261,6 @@ static int open_f(stream_t *stream)
MP_INFO(stream, "Writing to stdout...\n");
p->fd = 1;
}
- p->close = false;
} else {
mode_t openmode = S_IRUSR | S_IWUSR;
#ifndef __MINGW32__