summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-06-11 12:16:42 +0200
committerwm4 <wm4@nowhere>2013-06-23 22:33:59 +0200
commit4f5e12136de717896bf322e75d42de1af09e1c3e (patch)
treef6b40f0ae7ab2ef410f1449e9626ab1140862836 /core
parentd064c69e1c958514c3ef4d7871bcd92c8ff92de9 (diff)
downloadmpv-4f5e12136de717896bf322e75d42de1af09e1c3e.tar.bz2
mpv-4f5e12136de717896bf322e75d42de1af09e1c3e.tar.xz
stream: remove padding parameter from stream_read_complete()
Seems like a completely unnecessary complication. Instead, always add a 1 byte padding (could be extended if a caller needs it), and clear it. Also add some documentation. There was some, but it was outdated and incomplete.
Diffstat (limited to 'core')
-rw-r--r--core/encode_lavc.c2
-rw-r--r--core/input/input.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/encode_lavc.c b/core/encode_lavc.c
index e7c52be221..747e3e67df 100644
--- a/core/encode_lavc.c
+++ b/core/encode_lavc.c
@@ -404,7 +404,7 @@ static void encode_2pass_prepare(struct encode_lavc_context *ctx,
set_to_avdictionary(dictp, "flags", "-pass2");
} else {
struct bstr content = stream_read_complete(*bytebuf, NULL,
- 1000000000, 1);
+ 1000000000);
if (content.start == NULL) {
mp_msg(MSGT_ENCODE, MSGL_WARN, "%s: could not read '%s', "
"disabling 2-pass encoding at pass 1\n",
diff --git a/core/input/input.c b/core/input/input.c
index 2d7569c8e9..dfa7d1e5b4 100644
--- a/core/input/input.c
+++ b/core/input/input.c
@@ -1737,7 +1737,7 @@ static int parse_config_file(struct input_ctx *ictx, char *file, bool warn)
mp_msg(MSGT_INPUT, MSGL_ERR, "Can't open input config file %s.\n", file);
return 0;
}
- bstr res = stream_read_complete(s, NULL, 1000000, 0);
+ bstr res = stream_read_complete(s, NULL, 1000000);
free_stream(s);
mp_msg(MSGT_INPUT, MSGL_V, "Parsing input config file %s\n", file);
int n_binds = parse_config(ictx, false, res, file);