[FFmpeg-devel] [PATCH]ffplay: Mention codec_name if decoder for codec_id could not be found.

Carl Eugen Hoyos ceffmpeg at gmail.com
Wed May 30 02:11:50 EEST 2018


2018-05-29 9:54 GMT+02:00, Marton Balint <cus at passwd.hu>:
>
>
> 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)

Patch applied.

Thank you, Carl Eugen


More information about the ffmpeg-devel mailing list