From f5b27b6d5f86626adf1ece529d8b48ddec7c2961 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Tue, 1 Oct 2013 23:42:07 +0200 Subject: ffprobe: print stream channel_layout when available Fix trac ticket #3006. --- ffprobe.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ffprobe.c') diff --git a/ffprobe.c b/ffprobe.c index 8b1a584..b7f287c 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; -- cgit v1.1