Commit ceb51f4e authored by Thomas Guillem's avatar Thomas Guillem

decoder: change DecoderUnsupportedCodec arguments

Use an es_format_t.
parent 1806cbc0
......@@ -1717,16 +1717,16 @@ static void DeleteDecoder( decoder_t * p_dec )
}
/* */
static void DecoderUnsupportedCodec( decoder_t *p_dec, vlc_fourcc_t codec )
static void DecoderUnsupportedCodec( decoder_t *p_dec, const es_format_t *fmt )
{
if (codec != VLC_FOURCC('u','n','d','f')) {
const char *desc = vlc_fourcc_GetDescription(p_dec->fmt_in.i_cat, codec);
if (fmt->i_codec != VLC_FOURCC('u','n','d','f')) {
const char *desc = vlc_fourcc_GetDescription(fmt->i_cat, fmt->i_codec);
if (!desc || !*desc)
desc = N_("No description for this codec");
msg_Err( p_dec, "Codec `%4.4s' (%s) is not supported.", (char*)&codec, desc );
msg_Err( p_dec, "Codec `%4.4s' (%s) is not supported.", (char*)&fmt->i_codec, desc );
dialog_Fatal( p_dec, _("Codec not supported"),
_("VLC could not decode the format \"%4.4s\" (%s)"),
(char*)&codec, desc );
(char*)&fmt->i_codec, desc );
} else {
msg_Err( p_dec, "could not identify codec" );
dialog_Fatal( p_dec, _("Unidentified codec"),
......@@ -1758,7 +1758,7 @@ static decoder_t *decoder_New( vlc_object_t *p_parent, input_thread_t *p_input,
if( !p_dec->p_module )
{
DecoderUnsupportedCodec( p_dec, fmt->i_codec );
DecoderUnsupportedCodec( p_dec, fmt );
DeleteDecoder( p_dec );
return NULL;
......@@ -2008,7 +2008,7 @@ int input_DecoderSetCcState( decoder_t *p_dec, bool b_decode, int i_channel )
}
else if( !p_cc->p_module )
{
DecoderUnsupportedCodec( p_dec, fcc[i_channel] );
DecoderUnsupportedCodec( p_dec, &fmt );
input_DecoderDelete(p_cc);
return VLC_EGENERIC;
}
......
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