From 417ffa8b40f1754f3062fe42db2842131babec72 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 13 Jul 2014 20:12:13 +0200 Subject: 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. --- audio/filter/af.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'audio') 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); } -- cgit v1.2.3