提交 913bc799 编写于 作者: M Michael Niedermayer

lavc: fix avcodec_get_type()

Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
上级 d66ee6ac
......@@ -1436,6 +1436,12 @@ int avcodec_thread_init(AVCodecContext *s, int thread_count)
enum AVMediaType avcodec_get_type(enum CodecID codec_id)
{
AVCodec *c= avcodec_find_decoder(codec_id);
if(!c)
c= avcodec_find_encoder(codec_id);
if(c)
return c->type;
if (codec_id <= CODEC_ID_NONE)
return AVMEDIA_TYPE_UNKNOWN;
else if (codec_id < CODEC_ID_FIRST_AUDIO)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册