Merge commit '2c6811397bdf13d43ca206e48d6d6da9c2cd47c6'
* commit '2c6811397bdf13d43ca206e48d6d6da9c2cd47c6': lavc: add profiles to AVCodecDescriptor Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
This commit is contained in:
@@ -2862,6 +2862,21 @@ const char *av_get_profile_name(const AVCodec *codec, int profile)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char *avcodec_profile_name(enum AVCodecID codec_id, int profile)
|
||||
{
|
||||
const AVCodecDescriptor *desc = avcodec_descriptor_get(codec_id);
|
||||
const AVProfile *p;
|
||||
|
||||
if (profile == FF_PROFILE_UNKNOWN || !desc || !desc->profiles)
|
||||
return NULL;
|
||||
|
||||
for (p = desc->profiles; p->profile != FF_PROFILE_UNKNOWN; p++)
|
||||
if (p->profile == profile)
|
||||
return p->name;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
unsigned avcodec_version(void)
|
||||
{
|
||||
// av_assert0(AV_CODEC_ID_V410==164);
|
||||
|
Reference in New Issue
Block a user