Commit 9c3cfb76 authored by reimar's avatar reimar

Change imprecise "Unknown codec" message to say "encoder" or "decoder"

instead of "codec"


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10142 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent f238dcc1
...@@ -2499,6 +2499,7 @@ static void opt_input_ts_offset(const char *arg) ...@@ -2499,6 +2499,7 @@ static void opt_input_ts_offset(const char *arg)
static enum CodecID find_codec_or_die(const char *name, int type, int encoder) static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
{ {
char *codec_string = encoder ? "encoder" : "decoder";
AVCodec *codec; AVCodec *codec;
if(!name) if(!name)
...@@ -2507,11 +2508,11 @@ static enum CodecID find_codec_or_die(const char *name, int type, int encoder) ...@@ -2507,11 +2508,11 @@ static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
avcodec_find_encoder_by_name(name) : avcodec_find_encoder_by_name(name) :
avcodec_find_decoder_by_name(name); avcodec_find_decoder_by_name(name);
if(!codec) { if(!codec) {
av_log(NULL, AV_LOG_ERROR, "Unknown codec '%s'\n", name); av_log(NULL, AV_LOG_ERROR, "Unknown %s '%s'\n", codec_string, name);
exit(1); exit(1);
} }
if(codec->type != type) { if(codec->type != type) {
av_log(NULL, AV_LOG_ERROR, "Invalid codec type '%s'\n", name); av_log(NULL, AV_LOG_ERROR, "Invalid %s type '%s'\n", codec_string, name);
exit(1); exit(1);
} }
return codec->id; return codec->id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment