mirror of https://github.com/mpv-player/mpv
stream: add STREAM_READ_FILE_FLAGS_DEFAULT
This is the default set of flags used by stream_read_file(). Useful for doing flag customization for stream_read_file2().
This commit is contained in:
parent
c2e71ceb07
commit
dc0d99eaff
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue