mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-23 17:05:00 +08:00
lavc: fix avcodec_get_type()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -1436,6 +1436,12 @@ int avcodec_thread_init(AVCodecContext *s, int thread_count)
|
|||||||
|
|
||||||
enum AVMediaType avcodec_get_type(enum CodecID codec_id)
|
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)
|
if (codec_id <= CODEC_ID_NONE)
|
||||||
return AVMEDIA_TYPE_UNKNOWN;
|
return AVMEDIA_TYPE_UNKNOWN;
|
||||||
else if (codec_id < CODEC_ID_FIRST_AUDIO)
|
else if (codec_id < CODEC_ID_FIRST_AUDIO)
|
||||||
|
Reference in New Issue
Block a user