summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-12-30 12:44:02 +0100
committerAnton Khirnov <anton@khirnov.net>2015-12-12 21:21:54 +0100
commitcdc9ce098e8d101b43b8f68dd35ba7226f4a728c (patch)
treef74e3f7326cdda18621aec525ae7e3d83b78d1bd /libavcodec/utils.c
parent6bf4c1d71199b92894f24db6386ed5070e590a16 (diff)
lavc: print the name of the codec, not its implementation, in avcodec_string
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 4f2f951069..af2835e8b9 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1754,6 +1754,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
int bitrate;
int new_line = 0;
AVRational display_aspect_ratio;
+ const AVCodecDescriptor *desc = avcodec_descriptor_get(enc->codec_id);
if (enc->codec)
p = enc->codec;
@@ -1762,9 +1763,11 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
else
p = avcodec_find_decoder(enc->codec_id);
- if (p) {
- codec_name = p->name;
+ if (p)
profile = av_get_profile_name(p, enc->profile);
+
+ if (desc) {
+ codec_name = desc->name;
} else if (enc->codec_id == AV_CODEC_ID_MPEG2TS) {
/* fake mpeg2 transport stream codec (currently not
* registered) */