aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2011-10-16 01:49:20 +0200
committerStefano Sabatini <stefasab@gmail.com>2011-10-16 01:58:31 +0200
commitbca8bd99d095ccaec07a5a7a38c77db6a30d68dc (patch)
treef842557be60350d7c7becd1e8e6f72ea4e635806
parent22137bb5c25364a2f7406914ad5688f449718f21 (diff)
downloadffmpeg-bca8bd99d095ccaec07a5a7a38c77db6a30d68dc.tar.gz
af_ashowinfo: fix plane size computation for planar layout formats
+10l.
-rw-r--r--libavfilter/af_ashowinfo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/af_ashowinfo.c b/libavfilter/af_ashowinfo.c
index c8e4d31a5b..0ad7252421 100644
--- a/libavfilter/af_ashowinfo.c
+++ b/libavfilter/af_ashowinfo.c
@@ -46,9 +46,10 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref)
char chlayout_str[128];
int plane;
int linesize =
- av_get_channel_layout_nb_channels(samplesref->audio->channel_layout) *
samplesref->audio->nb_samples *
av_get_bytes_per_sample(samplesref->format);
+ if (!samplesref->audio->planar) /* packed layout */
+ linesize *= av_get_channel_layout_nb_channels(samplesref->audio->channel_layout);
for (plane = 0; samplesref->data[plane] && plane < 8; plane++) {
uint8_t *data = samplesref->data[plane];