summaryrefslogtreecommitdiffstats
path: root/common/encode_lavc.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/encode_lavc.c')
-rw-r--r--common/encode_lavc.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/common/encode_lavc.c b/common/encode_lavc.c
index a250f9c994..33743007dd 100644
--- a/common/encode_lavc.c
+++ b/common/encode_lavc.c
@@ -117,12 +117,6 @@ struct encode_lavc_context *encode_lavc_init(struct mpv_global *global)
if (!strcmp(filename, "-"))
filename = "pipe:1";
- if (filename && (
- !strcmp(filename, "/dev/stdout") ||
- !strcmp(filename, "pipe:") ||
- !strcmp(filename, "pipe:1")))
- mp_msg_force_stderr(global, true);
-
encode_lavc_discontinuity(ctx);
p->muxer = avformat_alloc_context();
@@ -946,4 +940,17 @@ fail:
return false;
}
+void encoder_update_log(struct mpv_global *global)
+{
+ struct encode_opts *options = mp_get_config_group(NULL, global, &encode_config);
+ if (options->file && (!strcmp(options->file, "-") ||
+ !strcmp(options->file, "/dev/stdout") ||
+ !strcmp(options->file, "pipe:") ||
+ !strcmp(options->file, "pipe:1")))
+ {
+ mp_msg_force_stderr(global, true);
+ }
+ talloc_free(options);
+}
+
// vim: ts=4 sw=4 et