aboutsummaryrefslogtreecommitdiffstats
path: root/ffprobe.c
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2015-11-27 14:33:02 -0800
committerMichael Niedermayer <michael@niedermayer.cc>2015-12-06 14:37:40 +0100
commit9670165cc2273597cfac0365da6598743e4c6ea2 (patch)
tree7367cb33c70c8cd5736342cc9cc9049950961c4b /ffprobe.c
parent65440916c17d55aaee2f0bb6eb9a0678841eff1b (diff)
downloadffmpeg-9670165cc2273597cfac0365da6598743e4c6ea2.tar.gz
ffprobe: Do not print profile names in -bitexact
Instead, print "unknown" if it's unknown, or their numerical values if they are known. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'ffprobe.c')
-rw-r--r--ffprobe.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/ffprobe.c b/ffprobe.c
index c304a6d8ad..71280836af 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -2148,10 +2148,16 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
}
}
- if (dec && (profile = av_get_profile_name(dec, dec_ctx->profile)))
+ if (!do_bitexact && dec && (profile = av_get_profile_name(dec, dec_ctx->profile)))
print_str("profile", profile);
- else
- print_str_opt("profile", "unknown");
+ else {
+ if (dec_ctx->profile != FF_PROFILE_UNKNOWN) {
+ char profile_num[12];
+ snprintf(profile_num, sizeof(profile_num), "%d", dec_ctx->profile);
+ print_str("profile", profile_num);
+ } else
+ print_str_opt("profile", "unknown");
+ }
s = av_get_media_type_string(dec_ctx->codec_type);
if (s) print_str ("codec_type", s);