[FFmpeg-devel] [PATCH] prefer non experimental decoders
Janne Grunau
janne-ffmpeg
Tue Jun 22 20:58:24 CEST 2010
Hi,
$subject
There is desire to mark the native vp8 decoder as experimental until it
fully passes the conformance test suite.
Baptiste disagreed but I still think it's useful.
Janne
-------------- next part --------------
commit 22314057e35cd9745fb8452f526ae7b21d3f3e3c
Author: Janne Grunau <janne at grunau.be>
Date: Tue Jun 22 20:46:53 2010 +0200
prefer non-experimental decoders
Same change for avcodec_find_decoder() as r23334 in avcodec_find_encoder()
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 008f9e9..c1dc3c4 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -755,14 +755,19 @@ AVCodec *avcodec_find_encoder_by_name(const char *name)
AVCodec *avcodec_find_decoder(enum CodecID id)
{
- AVCodec *p;
+ AVCodec *p, *experimental=NULL;
p = first_avcodec;
while (p) {
- if (p->decode != NULL && p->id == id)
- return p;
+ if (p->decode != NULL && p->id == id) {
+ if (p->capabilities & CODEC_CAP_EXPERIMENTAL && !experimental) {
+ experimental = p;
+ } else {
+ return p;
+ }
+ }
p = p->next;
}
- return NULL;
+ return experimental;
}
AVCodec *avcodec_find_decoder_by_name(const char *name)
More information about the ffmpeg-devel
mailing list