diff --git a/stream/stream.c b/stream/stream.c index 5cca42e2a4..2e0ac39ecc 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -856,9 +856,8 @@ struct bstr stream_read_complete(struct stream *s, void *talloc_ctx, struct bstr stream_read_file(const char *filename, void *talloc_ctx, struct mpv_global *global, int max_size) { - int flags = STREAM_ORIGIN_DIRECT | STREAM_READ | STREAM_LOCAL_FS_ONLY | - STREAM_LESS_NOISE; - return stream_read_file2(filename, talloc_ctx, flags, global, max_size); + return stream_read_file2(filename, talloc_ctx, STREAM_READ_FILE_FLAGS_DEFAULT, + global, max_size); } struct bstr stream_read_file2(const char *filename, void *talloc_ctx, diff --git a/stream/stream.h b/stream/stream.h index eb44e23a1f..d4c5d0fded 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -55,6 +55,10 @@ #define STREAM_LESS_NOISE (1 << 6) // try to log errors only #define STREAM_ALLOW_PARTIAL_READ (1 << 7) // allows partial read with stream_read_file() +// Default flags used by stream_read_file(). +#define STREAM_READ_FILE_FLAGS_DEFAULT \ + (STREAM_ORIGIN_DIRECT | STREAM_READ | STREAM_LOCAL_FS_ONLY | STREAM_LESS_NOISE) + // end flags for stream_open_ext (the naming convention sucks) #define STREAM_UNSAFE -3