summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--stream/stream_file.c3
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) {