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:
Anssi Hannula
2011-01-07 22:27:26 +00:00
committed by Carl Eugen Hoyos
parent f2953365d1
commit 060ec0a829
3 changed files with 36 additions and 2 deletions

View File

@@ -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;