1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-22 06:42:03 +00:00

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:

2aa6acd974: 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.

3859bbd9fe: 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.

58846451f0: 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.
This commit is contained in:
wm4 2017-05-11 08:07:09 +02:00
parent a28cf44ebc
commit aac871deb4
2 changed files with 9 additions and 11 deletions

View File

@ -235,7 +235,7 @@ LGPL relicensing status:
stream/stream_dvd_common.* unknown
stream/stream_dvdnav.c unknown
stream/stream_edl.c LGPL
stream/stream_file.c hard
stream/stream_file.c LGPL
stream/stream.h hard
stream/stream_lavf.c hard
stream/stream_libarchive.* LGPL

View File

@ -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__