diff options
author | wm4 <wm4@nowhere> | 2014-07-13 20:12:13 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-13 20:12:13 +0200 |
commit | 417ffa8b40f1754f3062fe42db2842131babec72 (patch) | |
tree | 91494348b5b8efaf6f051009ce5628b7a3083339 /audio/filter | |
parent | d54d21cbd5fdcb3004b55f1779e87b23a3d4a6ea (diff) | |
download | mpv-417ffa8b40f1754f3062fe42db2842131babec72.tar.bz2 mpv-417ffa8b40f1754f3062fe42db2842131babec72.tar.xz |
Remove some mp_msg calls with no trailing \n
The final goal is all mp_msg calls produce complete lines. We want this
because otherwise, race conditions could corrupt the terminal output,
and it's inconvenient for the client API too. This commit works towards
this goal. There's still code that has this not fixed yet, though.
Diffstat (limited to 'audio/filter')
-rw-r--r-- | audio/filter/af.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/audio/filter/af.c b/audio/filter/af.c index c69077e93f..fe2dcdfb13 100644 --- a/audio/filter/af.c +++ b/audio/filter/af.c @@ -311,22 +311,22 @@ static void af_print_filter_chain(struct af_stream *s, struct af_instance *at, struct af_instance *af = s->first; while (af) { - MP_MSG(s, msg_level, " [%s] ", af->info->name); + char b[128] = {0}; + mp_snprintf_cat(b, sizeof(b), " [%s] ", af->info->name); if (af->data) { char *info = mp_audio_config_to_str(af->data); - MP_MSG(s, msg_level, "%s", info); + mp_snprintf_cat(b, sizeof(b), "%s", info); talloc_free(info); } if (af == at) - MP_MSG(s, msg_level, " <-"); - MP_MSG(s, msg_level, "\n"); + mp_snprintf_cat(b, sizeof(b), " <-"); + MP_MSG(s, msg_level, "%s\n", b); af = af->next; } - MP_MSG(s, msg_level, " [ao] "); char *info = mp_audio_config_to_str(&s->output); - MP_MSG(s, msg_level, "%s\n", info); + MP_MSG(s, msg_level, " [ao] %s\n", info); talloc_free(info); } |