mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-12 10:00:08 +01:00
Add av_get_profile_name() to get profile names.
Patch by Anssi Hannula, anssi d hannula a iki d fi Originally committed as revision 26259 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
committed by
Carl Eugen Hoyos
parent
f2953365d1
commit
060ec0a829
@@ -966,6 +966,19 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
|
||||
}
|
||||
}
|
||||
|
||||
const char *av_get_profile_name(const AVCodec *codec, int profile)
|
||||
{
|
||||
const AVProfile *p;
|
||||
if (profile == FF_PROFILE_UNKNOWN || !codec->profiles)
|
||||
return NULL;
|
||||
|
||||
for (p = codec->profiles; p->profile != FF_PROFILE_UNKNOWN; p++)
|
||||
if (p->profile == profile)
|
||||
return p->name;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
unsigned avcodec_version( void )
|
||||
{
|
||||
return LIBAVCODEC_VERSION_INT;
|
||||
|
||||
Reference in New Issue
Block a user