[FFmpeg-cvslog] lavfi/showwaves: fix floating exception with >8 channels
Paul B Mahol
git at videolan.org
Sun Jul 14 00:00:11 CEST 2013
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Jul 13 21:46:27 2013 +0000| [6347824d5310691d1e0bf34a87c6044f28e4b9c7] | committer: Paul B Mahol
lavfi/showwaves: fix floating exception with >8 channels
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6347824d5310691d1e0bf34a87c6044f28e4b9c7
---
libavfilter/avf_showwaves.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c
index e9d3062..52cd60f 100644
--- a/libavfilter/avf_showwaves.c
+++ b/libavfilter/avf_showwaves.c
@@ -169,7 +169,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
AVFrame *outpicref = showwaves->outpicref;
int linesize = outpicref ? outpicref->linesize[0] : 0;
int16_t *p = (int16_t *)insamples->data[0];
- int nb_channels = av_get_channel_layout_nb_channels(insamples->channel_layout);
+ int nb_channels = inlink->channels;
int i, j, k, h, ret = 0;
const int n = showwaves->n;
const int x = 255 / (nb_channels * n); /* multiplication factor, pre-computed to avoid in-loop divisions */
More information about the ffmpeg-cvslog
mailing list