summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-05-03 17:25:01 +0300
committerUoti Urpala <uau@mplayer2.org>2011-05-03 17:25:01 +0300
commit24d0d48c4a658ed863b2e0246d1362ca3c4b3d19 (patch)
tree37ab317eafc54df9b4108985f2b7ef5a9be343a0 /libmpcodecs
parent0321d683b4b970fd1025f8613c6a0ce9fcc98716 (diff)
downloadmpv-24d0d48c4a658ed863b2e0246d1362ca3c4b3d19.tar.bz2
mpv-24d0d48c4a658ed863b2e0246d1362ca3c4b3d19.tar.xz
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.
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/dec_audio.c4
1 files changed, 3 insertions, 1 deletions
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!