diff options
author | wm4 <wm4@nowhere> | 2017-05-11 08:07:09 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-05-11 08:14:48 +0200 |
commit | aac871deb40b4216ebb45e02a78d1b2c72f22211 (patch) | |
tree | 227b01c0027c70527a3c86967195985f88b7ad00 /stream | |
parent | a28cf44ebc90f9fb4c1943aa128dd5d25573e181 (diff) |
stream_file: change license to LGPL
This has a messy history all back to the initial commit with multiple
refactors, but it seems almost all authors agreed.
Exceptions:
2aa6acd9747: patch by someone who could not be reached. Whether or not
this code is still in mpv is unknown, but the affected code was moved to
stream.c at one point anyway.
3859bbd9fef: not sure if this is a patch by the mentioned person (I
assume not) or the committer (who agreed to LGPL), but it seems the
change is too trivial to affect copyright. It seems even the FD check
can be dropped, which I'm doing in this commit.
58846451f0e: author doesn't reply. But reverting this and letting
someone who has never seen this commit before redo it would lead to
exactly the same code. So I'm claiming that the change is not
copyrightable.
Diffstat (limited to 'stream')
-rw-r--r-- | stream/stream_file.c | 18 |
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__ |