diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-01-01 16:16:57 +0100 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-01-01 16:20:39 +0100 |
commit | 5e8b05345243cdec3ca01116ce130da812ffed3d (patch) | |
tree | 497704c9f07bbee3858e88ba95780688fa2aad0d /libavcodec/utils.c | |
parent | 5f2d12b82494220f2fa65bd3295617e09ef25cad (diff) | |
parent | 2c6811397bdf13d43ca206e48d6d6da9c2cd47c6 (diff) | |
download | ffmpeg-streaming-5e8b05345243cdec3ca01116ce130da812ffed3d.zip ffmpeg-streaming-5e8b05345243cdec3ca01116ce130da812ffed3d.tar.gz |
Merge commit '2c6811397bdf13d43ca206e48d6d6da9c2cd47c6'
* commit '2c6811397bdf13d43ca206e48d6d6da9c2cd47c6':
lavc: add profiles to AVCodecDescriptor
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 33295ed..ddd939c 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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); |