summaryrefslogtreecommitdiff
path: root/ffprobe.c
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@smartjog.com>2012-02-06 11:58:14 +0100
committerStefano Sabatini <stefasab@gmail.com>2012-02-20 17:46:26 +0100
commit278d6ab90041cb52fb76a84dcff062db8c2398e2 (patch)
treeece79b193f916f53b48f349a633d4a48d1423858 /ffprobe.c
parent3293b1adca637c29d555b4980d4f0f9cfe7fba78 (diff)
ffprobe: report bit rate in stream description
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
Diffstat (limited to 'ffprobe.c')
-rw-r--r--ffprobe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ffprobe.c b/ffprobe.c
index f4174fae5e..21e81c81aa 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -1509,6 +1509,8 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
print_fmt("time_base", "%d/%d", stream->time_base.num, stream->time_base.den);
print_time("start_time", stream->start_time, &stream->time_base);
print_time("duration", stream->duration, &stream->time_base);
+ if (dec_ctx->bit_rate > 0) print_val ("bit_rate", dec_ctx->bit_rate, unit_bit_per_second_str);
+ else print_str_opt("bit_rate", "N/A");
if (stream->nb_frames) print_fmt ("nb_frames", "%"PRId64, stream->nb_frames);
else print_str_opt("nb_frames", "N/A");
if (nb_streams_frames[stream_idx]) print_fmt ("nb_read_frames", "%"PRIu64, nb_streams_frames[stream_idx]);