From 24d0d48c4a658ed863b2e0246d1362ca3c4b3d19 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Tue, 3 May 2011 17:25:01 +0300 Subject: [PATCH] audio: avoid duplicated error messages on init failure dec_audio.c init_audio_codec() would in one case print "ADecoder init failed :(\n" and return failure. Its only caller init_best_audio_codec() printed exactly the same message if the returned result was failure. Change the latter message to say "Could not open audio decoder %s.\n" instead. Some of the per-open-attempt messages are kind of value about their context; this new message should make it more clear where the attempt to open one specific codec ends. --- libmpcodecs/dec_audio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libmpcodecs/dec_audio.c b/libmpcodecs/dec_audio.c index 7bbbdeb058..00c66287ed 100644 --- a/libmpcodecs/dec_audio.c +++ b/libmpcodecs/dec_audio.c @@ -228,7 +228,9 @@ static int init_audio(sh_audio_t *sh_audio, char *codecname, char *afm, mpadec->info->short_name, mpadec->info->name); sh_audio->ad_driver = mpadec; if (!init_audio_codec(sh_audio)) { - mp_tmsg(MSGT_DECAUDIO, MSGL_INFO, "ADecoder init failed :(\n"); + mp_tmsg(MSGT_DECAUDIO, MSGL_WARN, + "Could not open audio decoder %s.\n", + mpadec->info->short_name); continue; // try next... } // Yeah! We got it!