summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2010-06-01 06:29:50 +0000
committerReinhard Tartler <siretart@tauware.de>2010-06-01 06:29:50 +0000
commit4979362ae4202395df99627803cae7180d7473cb (patch)
treec5775e7f6eed78cd6e85860d15a56dff8e2ca1d5
parent0546386dffe219e2f6c93f64aac4accefe2b1f93 (diff)
ffmpeg: offer alternatives for experimental codecs if they exist
backport r23398 by janne Originally committed as revision 23400 to svn://svn.ffmpeg.org/ffmpeg/branches/0.6
-rw-r--r--ffmpeg.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index e2ea308d81..6b9380f77a 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2935,6 +2935,12 @@ static enum CodecID find_codec_or_die(const char *name, int type, int encoder, i
fprintf(stderr, "%s '%s' is experimental and might produce bad "
"results.\nAdd '-strict experimental' if you want to use it.\n",
codec_string, codec->name);
+ codec = encoder ?
+ avcodec_find_encoder(codec->id) :
+ avcodec_find_decoder(codec->id);
+ if (!(codec->capabilities & CODEC_CAP_EXPERIMENTAL))
+ fprintf(stderr, "Or use the non experimental %s '%s'.\n",
+ codec_string, codec->name);
av_exit(1);
}
return codec->id;