avcodec_find_decoder: prefer non experimental decoders.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -903,14 +903,18 @@ AVCodec *avcodec_find_encoder_by_name(const char *name)
|
|||||||
|
|
||||||
AVCodec *avcodec_find_decoder(enum CodecID id)
|
AVCodec *avcodec_find_decoder(enum CodecID id)
|
||||||
{
|
{
|
||||||
AVCodec *p;
|
AVCodec *p, *experimental=NULL;
|
||||||
p = first_avcodec;
|
p = first_avcodec;
|
||||||
while (p) {
|
while (p) {
|
||||||
if (p->decode != NULL && p->id == id)
|
if (p->decode != NULL && p->id == id) {
|
||||||
return p;
|
if (p->capabilities & CODEC_CAP_EXPERIMENTAL && !experimental) {
|
||||||
|
experimental = p;
|
||||||
|
} else
|
||||||
|
return p;
|
||||||
|
}
|
||||||
p = p->next;
|
p = p->next;
|
||||||
}
|
}
|
||||||
return NULL;
|
return experimental;
|
||||||
}
|
}
|
||||||
|
|
||||||
AVCodec *avcodec_find_decoder_by_name(const char *name)
|
AVCodec *avcodec_find_decoder_by_name(const char *name)
|
||||||
|
Reference in New Issue
Block a user