[FFmpeg-cvslog] r26264 - trunk/libavcodec/utils.c
cehoyos
subversion
Sat Jan 8 10:23:25 CET 2011
Author: cehoyos
Date: Sat Jan 8 10:23:25 2011
New Revision: 26264
Log:
Show profile in avcodec_string().
Patch by Anssi Hannula, anssi d hannula a iki d fi
Modified:
trunk/libavcodec/utils.c
Modified: trunk/libavcodec/utils.c
==============================================================================
--- trunk/libavcodec/utils.c Sat Jan 8 00:56:47 2011 (r26263)
+++ trunk/libavcodec/utils.c Sat Jan 8 10:23:25 2011 (r26264)
@@ -871,6 +871,7 @@ size_t av_get_codec_tag_string(char *buf
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
{
const char *codec_name;
+ const char *profile = NULL;
AVCodec *p;
char buf1[32];
int bitrate;
@@ -883,6 +884,7 @@ void avcodec_string(char *buf, int buf_s
if (p) {
codec_name = p->name;
+ profile = av_get_profile_name(p, enc->profile);
} else if (enc->codec_id == CODEC_ID_MPEG2TS) {
/* fake mpeg2 transport stream codec (currently not
registered) */
@@ -902,6 +904,9 @@ void avcodec_string(char *buf, int buf_s
snprintf(buf, buf_size,
"Video: %s%s",
codec_name, enc->mb_decision ? " (hq)" : "");
+ if (profile)
+ snprintf(buf + strlen(buf), buf_size - strlen(buf),
+ " (%s)", profile);
if (enc->pix_fmt != PIX_FMT_NONE) {
snprintf(buf + strlen(buf), buf_size - strlen(buf),
", %s",
@@ -937,6 +942,9 @@ void avcodec_string(char *buf, int buf_s
snprintf(buf, buf_size,
"Audio: %s",
codec_name);
+ if (profile)
+ snprintf(buf + strlen(buf), buf_size - strlen(buf),
+ " (%s)", profile);
if (enc->sample_rate) {
snprintf(buf + strlen(buf), buf_size - strlen(buf),
", %d Hz", enc->sample_rate);
More information about the ffmpeg-cvslog
mailing list