diff --git a/avconv_opt.c b/avconv_opt.c index 97ae0a4bf9..5c6fc8741f 100644 --- a/avconv_opt.c +++ b/avconv_opt.c @@ -381,12 +381,22 @@ static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFor static AVCodec *find_codec_or_die(const char *name, enum AVMediaType type, int encoder) { + const AVCodecDescriptor *desc; const char *codec_string = encoder ? "encoder" : "decoder"; AVCodec *codec; codec = encoder ? avcodec_find_encoder_by_name(name) : avcodec_find_decoder_by_name(name); + + if (!codec && (desc = avcodec_descriptor_get_by_name(name))) { + codec = encoder ? avcodec_find_encoder(desc->id) : + avcodec_find_decoder(desc->id); + if (codec) + av_log(NULL, AV_LOG_VERBOSE, "Matched %s '%s' for codec '%s'.\n", + codec_string, codec->name, desc->name); + } + if (!codec) { av_log(NULL, AV_LOG_FATAL, "Unknown %s '%s'\n", codec_string, name); exit_program(1);