ffmpeg: use avcodec_get_name to report missing en/decoders.
This commit is contained in:
parent
d2d7b7134f
commit
83ff2a1153
8
ffmpeg.c
8
ffmpeg.c
@ -2436,8 +2436,8 @@ static int transcode(AVFormatContext **output_files,
|
|||||||
AVCodec *codec = ost->enc;
|
AVCodec *codec = ost->enc;
|
||||||
AVCodecContext *dec = input_streams[ost->source_index].st->codec;
|
AVCodecContext *dec = input_streams[ost->source_index].st->codec;
|
||||||
if (!codec) {
|
if (!codec) {
|
||||||
snprintf(error, sizeof(error), "Encoder (codec id %d) not found for output stream #%d.%d",
|
snprintf(error, sizeof(error), "Encoder (codec %s) not found for output stream #%d.%d",
|
||||||
ost->st->codec->codec_id, ost->file_index, ost->index);
|
avcodec_get_name(ost->st->codec->codec_id), ost->file_index, ost->index);
|
||||||
ret = AVERROR(EINVAL);
|
ret = AVERROR(EINVAL);
|
||||||
goto dump_format;
|
goto dump_format;
|
||||||
}
|
}
|
||||||
@ -2473,8 +2473,8 @@ static int transcode(AVFormatContext **output_files,
|
|||||||
if (!codec)
|
if (!codec)
|
||||||
codec = avcodec_find_decoder(ist->st->codec->codec_id);
|
codec = avcodec_find_decoder(ist->st->codec->codec_id);
|
||||||
if (!codec) {
|
if (!codec) {
|
||||||
snprintf(error, sizeof(error), "Decoder (codec id %d) not found for input stream #%d.%d",
|
snprintf(error, sizeof(error), "Decoder (codec %s) not found for input stream #%d.%d",
|
||||||
ist->st->codec->codec_id, ist->file_index, ist->st->index);
|
avcodec_get_name(ist->st->codec->codec_id), ist->file_index, ist->st->index);
|
||||||
ret = AVERROR(EINVAL);
|
ret = AVERROR(EINVAL);
|
||||||
goto dump_format;
|
goto dump_format;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user