1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 09:02:38 +00:00

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.
This commit is contained in:
Uoti Urpala 2011-05-03 17:25:01 +03:00
parent 0321d683b4
commit 24d0d48c4a

View File

@ -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!