From 7d6e58471f378215d4f104b85ca6190d7e98abcf Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 25 Nov 2014 11:11:31 +0100 Subject: audio: make mp_audio_config_to_str return a stack-allocated string Simpler overall. --- audio/filter/af.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'audio/filter') diff --git a/audio/filter/af.c b/audio/filter/af.c index b93b703883..171169f62c 100644 --- a/audio/filter/af.c +++ b/audio/filter/af.c @@ -308,11 +308,8 @@ static void af_print_filter_chain(struct af_stream *s, struct af_instance *at, while (af) { 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_snprintf_cat(b, sizeof(b), "%s", info); - talloc_free(info); - } + if (af->data) + mp_snprintf_cat(b, sizeof(b), "%s", mp_audio_config_to_str(af->data)); if (af == at) mp_snprintf_cat(b, sizeof(b), " <-"); MP_MSG(s, msg_level, "%s\n", b); @@ -320,9 +317,7 @@ static void af_print_filter_chain(struct af_stream *s, struct af_instance *at, af = af->next; } - char *info = mp_audio_config_to_str(&s->output); - MP_MSG(s, msg_level, " [ao] %s\n", info); - talloc_free(info); + MP_MSG(s, msg_level, " [ao] %s\n", mp_audio_config_to_str(&s->output)); } static int af_count_filters(struct af_stream *s) -- cgit v1.2.3