[FFmpeg-devel] [PATCH]ffplay: Mention codec_name if decoder for codec_id could not be found.
Marton Balint
cus at passwd.hu
Tue May 29 10:54:44 EEST 2018
On Tue, 29 May 2018, Carl Eugen Hoyos wrote:
> Hi!
>
> Attached patch makes debugging a little easier imo.
>
> Please comment, Carl Eugen
>
> diff --git a/fftools/ffplay.c b/fftools/ffplay.c
> index dcca9c2..f9571d7 100644
> --- a/fftools/ffplay.c
> +++ b/fftools/ffplay.c
> @@ -2578,7 +2578,7 @@ static int stream_component_open(VideoState *is, int stream_index)
> if (forced_codec_name) av_log(NULL, AV_LOG_WARNING,
> "No codec could be found with name '%s'\n", forced_codec_name);
> else av_log(NULL, AV_LOG_WARNING,
> - "No codec could be found with id %d\n", avctx->codec_id);
> + "No codec could be found with id %d (%s)\n", avctx->codec_id, avcodec_get_name(avctx->codec_id));
Maybe go one step further, and change the error message to
"No decoder could be found for codec %s\n", avcodec_get_name(avctx->codec_id)
I don't see any use for dumping the codec_id, it has no usefulness to the
end user IMHO.
Regards,
Marton
More information about the ffmpeg-devel
mailing list