summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2016-01-01 16:29:28 +0100
committerHendrik Leppkes <h.leppkes@gmail.com>2016-01-01 16:29:28 +0100
commit15c60c8af2271cd7d5c6c6ce7f8f127a32f18cfd (patch)
treed2dcafc4dc5d9305e7f45dfd11db1319f00ed90d /libavcodec/utils.c
parente76064172098582148665df15484ae5d4e5194a9 (diff)
parentcea1eef25c3310a68dd327eb74aae14ad3c2ddef (diff)
Merge commit 'cea1eef25c3310a68dd327eb74aae14ad3c2ddef'
* commit 'cea1eef25c3310a68dd327eb74aae14ad3c2ddef': lavc: get the profile name through the codec descriptor in avcodec_string() Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index ddd939c60a..4b4aea02bd 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2669,7 +2669,6 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
const char *codec_type;
const char *codec_name;
const char *profile = NULL;
- const AVCodec *p;
int64_t bitrate;
int new_line = 0;
AVRational display_aspect_ratio;
@@ -2679,15 +2678,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
return;
codec_type = av_get_media_type_string(enc->codec_type);
codec_name = avcodec_get_name(enc->codec_id);
- if (enc->profile != FF_PROFILE_UNKNOWN) {
- if (enc->codec)
- p = enc->codec;
- else
- p = encode ? avcodec_find_encoder(enc->codec_id) :
- avcodec_find_decoder(enc->codec_id);
- if (p)
- profile = av_get_profile_name(p, enc->profile);
- }
+ profile = avcodec_profile_name(enc->codec_id, enc->profile);
snprintf(buf, buf_size, "%s: %s", codec_type ? codec_type : "unknown",
codec_name);