Commit f3c00be2 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/vf_waveform: only use available components

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent e0f5f926
......@@ -1158,7 +1158,7 @@ static int config_output(AVFilterLink *outlink)
if (!s->peak)
return AVERROR(ENOMEM);
for (p = 0; p < 4; p++) {
for (p = 0; p < s->ncomp; p++) {
const int is_chroma = (p == 1 || p == 2);
const int shift_w = (is_chroma ? s->desc->log2_chroma_w : 0);
const int shift_h = (is_chroma ? s->desc->log2_chroma_h : 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment