vlc | branch: master | Rafaël Carré <[email protected]> | Wed Dec 18 11:55:14 2013 +0100| [681bf48f3c246640a193b009f5b86010495c4849] | committer: 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 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=681bf48f3c246640a193b009f5b86010495c4849 --- src/input/decoder.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/input/decoder.c b/src/input/decoder.c index 57ad129..38da0dc 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -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" ) ); + } } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
