diff options
author | Ben Boeckel <mathstuf@gmail.com> | 2015-07-09 16:13:40 -0400 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-07-09 23:04:06 +0200 |
commit | 731fc5b816fad91607728a2bfd1db6bb0317d511 (patch) | |
tree | be4ec5590da26a310966328197c76f76d263e363 | |
parent | f3d06e3e913ea061a716935a561c9d5c1758f718 (diff) | |
download | mpv-731fc5b816fad91607728a2bfd1db6bb0317d511.tar.bz2 mpv-731fc5b816fad91607728a2bfd1db6bb0317d511.tar.xz |
stream_file: initialize `fd`
Use the fd variable and delay assignment to priv->fd to mirror other
branches of the if/else tree.
-rw-r--r-- | stream/stream_file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stream/stream_file.c b/stream/stream_file.c index bfc50df5de..54a848e4c8 100644 --- a/stream/stream_file.c +++ b/stream/stream_file.c @@ -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) { |