mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 08:12:17 +00:00
stream_file: initialize fd
Use the fd variable and delay assignment to priv->fd to mirror other branches of the if/else tree.
This commit is contained in:
parent
f3d06e3e91
commit
731fc5b816
@ -249,11 +249,12 @@ static int open_f(stream_t *stream)
|
||||
|
||||
if (strncmp(stream->url, "fd://", 5) == 0) {
|
||||
char *end = NULL;
|
||||
priv->fd = strtol(stream->url + 5, &end, 0);
|
||||
fd = strtol(stream->url + 5, &end, 0);
|
||||
if (!end || end == stream->url + 5 || end[0]) {
|
||||
MP_ERR(stream, "Invalid FD: %s\n", stream->url);
|
||||
return STREAM_ERROR;
|
||||
}
|
||||
priv->fd = fd;
|
||||
priv->close = false;
|
||||
} else if (!strcmp(filename, "-")) {
|
||||
if (!write) {
|
||||
|
Loading…
Reference in New Issue
Block a user