aboutsummaryrefslogtreecommitdiffstats
path: root/ffprobe.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2013-10-01 23:42:07 +0200
committerStefano Sabatini <stefasab@gmail.com>2013-10-03 09:19:38 +0200
commitf5b27b6d5f86626adf1ece529d8b48ddec7c2961 (patch)
tree37db2f73fe9b7087a3d267ed71c81e82620d65aa /ffprobe.c
parentb5f219c904b9b17c35c5c5aee3384586cb6302a8 (diff)
downloadffmpeg-f5b27b6d5f86626adf1ece529d8b48ddec7c2961.tar.gz
ffprobe: print stream channel_layout when available
Fix trac ticket #3006.
Diffstat (limited to 'ffprobe.c')
-rw-r--r--ffprobe.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ffprobe.c b/ffprobe.c
index 8b1a584ab3..b7f287c7fb 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -1823,6 +1823,15 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
else print_str_opt("sample_fmt", "unknown");
print_val("sample_rate", dec_ctx->sample_rate, unit_hertz_str);
print_int("channels", dec_ctx->channels);
+
+ if (dec_ctx->channel_layout) {
+ av_bprint_clear(&pbuf);
+ av_bprint_channel_layout(&pbuf, dec_ctx->channels, dec_ctx->channel_layout);
+ print_str ("channel_layout", pbuf.str);
+ } else {
+ print_str_opt("channel_layout", "unknown");
+ }
+
print_int("bits_per_sample", av_get_bits_per_sample(dec_ctx->codec_id));
break;