summaryrefslogtreecommitdiff
path: root/ffprobe.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-07-30 15:53:14 +0200
committerStefano Sabatini <stefasab@gmail.com>2012-07-31 13:21:29 +0200
commitc809b89a1272226916890e6bff7d406772c846e1 (patch)
treecf764019decad0e5296c61ecc13fe81707e12b24 /ffprobe.c
parent23fc4dd6e7e150ea163a867dfaee2062ade90b74 (diff)
ffprobe: show audio frame channels and channel_layout
Diffstat (limited to 'ffprobe.c')
-rw-r--r--ffprobe.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ffprobe.c b/ffprobe.c
index e14de3be8a..f81bc3b788 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -1647,6 +1647,14 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream,
if (s) print_str ("sample_fmt", s);
else print_str_opt("sample_fmt", "unknown");
print_int("nb_samples", frame->nb_samples);
+ print_int("channels", av_frame_get_channels(frame));
+ if (av_frame_get_channel_layout(frame)) {
+ av_bprint_clear(&pbuf);
+ av_bprint_channel_layout(&pbuf, av_frame_get_channels(frame),
+ av_frame_get_channel_layout(frame));
+ print_str ("channel_layout", pbuf.str);
+ } else
+ print_str_opt("channel_layout", "unknown");
break;
}
show_tags(av_frame_get_metadata(frame));