Browse code

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>

Timothy Gu authored on 2015/11/28 07:33:02
Showing 1 changed files
... ...
@@ -2148,10 +2148,16 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
2148 2148
             }
2149 2149
         }
2150 2150
 
2151
-        if (dec && (profile = av_get_profile_name(dec, dec_ctx->profile)))
2151
+        if (!do_bitexact && dec && (profile = av_get_profile_name(dec, dec_ctx->profile)))
2152 2152
             print_str("profile", profile);
2153
-        else
2154
-            print_str_opt("profile", "unknown");
2153
+        else {
2154
+            if (dec_ctx->profile != FF_PROFILE_UNKNOWN) {
2155
+                char profile_num[12];
2156
+                snprintf(profile_num, sizeof(profile_num), "%d", dec_ctx->profile);
2157
+                print_str("profile", profile_num);
2158
+            } else
2159
+                print_str_opt("profile", "unknown");
2160
+        }
2155 2161
 
2156 2162
         s = av_get_media_type_string(dec_ctx->codec_type);
2157 2163
         if (s) print_str    ("codec_type", s);