[FFmpeg-cvslog] r10142 - trunk/ffmpeg.c

reimar subversion
Sun Aug 19 13:12:47 CEST 2007


Author: reimar
Date: Sun Aug 19 13:12:47 2007
New Revision: 10142

Log:
Change imprecise "Unknown codec" message to say "encoder" or "decoder"
instead of "codec"


Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	(original)
+++ trunk/ffmpeg.c	Sun Aug 19 13:12:47 2007
@@ -2499,6 +2499,7 @@ static void opt_input_ts_offset(const ch
 
 static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
 {
+    char *codec_string = encoder ? "encoder" : "decoder";
     AVCodec *codec;
 
     if(!name)
@@ -2507,11 +2508,11 @@ static enum CodecID find_codec_or_die(co
         avcodec_find_encoder_by_name(name) :
         avcodec_find_decoder_by_name(name);
     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);
     }
     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);
     }
     return codec->id;




More information about the ffmpeg-cvslog mailing list