Commit 681bf48f authored by Rafaël Carré's avatar Rafaël Carré

Improve the unsupported codec errors

Provide a description of the codec if possible
Give a more descriptive message if the codec is "undf"
That one means that the demuxer could not identify the codec
parent c4afbb6c
......@@ -683,13 +683,22 @@ static int DecoderGetDisplayRate( decoder_t *p_dec )
/* */
static void DecoderUnsupportedCodec( decoder_t *p_dec, vlc_fourcc_t codec )
{
msg_Err( p_dec, "no suitable decoder module for fourcc `%4.4s'. "
"VLC probably does not support this sound or video format.",
(char*)&codec );
dialog_Fatal( p_dec, _("No suitable decoder module"),
_("VLC does not support the audio or video format \"%4.4s\". "
"Unfortunately there is no way for you to fix this."),
(char*)&codec );
if (codec != VLC_FOURCC('u','n','d','f')) {
const char *desc = vlc_fourcc_GetDescription(p_dec->fmt_in.i_cat, codec);
if (!desc || !*desc)
desc = N_("No description for this codec");
msg_Err( p_dec, "no suitable decoder module for fourcc `%4.4s' (%s). "
"VLC probably does not support this sound or video format.",
(char*)&codec, desc );
dialog_Fatal( p_dec, _("No suitable decoder module"),
_("VLC does not support the audio or video format \"%4.4s\" (%s). "
"Unfortunately there is no way for you to fix this."),
(char*)&codec, desc );
} else {
msg_Err( p_dec, "could not identify codec" );
dialog_Fatal( p_dec, _("Unidentified codec"),
_("VLC could not identify the audio or video codec" ) );
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment